diff options
| author | ruki <[email protected]> | 2016-07-14 13:29:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-07-14 13:29:28 +0800 |
| commit | 8eb084ef12dccf72659704252f13cc3eea4b8fa6 (patch) | |
| tree | a3c918e1f1d0880c615a4e883d6ff28ffe4a6669 | |
| parent | da4a5080928e8500b54df127a471723e8f0baf0a (diff) | |
fix check emoji bug
| -rw-r--r-- | xmake/core/base/emoji.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/core/base/emoji.lua b/xmake/core/base/emoji.lua index 7279a3ca8..2f654e233 100644 --- a/xmake/core/base/emoji.lua +++ b/xmake/core/base/emoji.lua @@ -36,13 +36,16 @@ emoji.keys = -- translate the string to emoji function emoji.translate(str) + -- translate it + local chars = emoji.keys[str] + -- check supported? - if xmake._HOST ~= "macosx" then - return nil + if chars and xmake._HOST ~= "macosx" then + return "" end - -- translate it - return emoji.keys[str] + -- ok? + return chars end -- return module |
