diff options
| -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 |
