From 8eb084ef12dccf72659704252f13cc3eea4b8fa6 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 14 Jul 2016 13:29:28 +0800 Subject: fix check emoji bug --- xmake/core/base/emoji.lua | 11 +++++++---- 1 file 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 -- cgit v1.3.1