From 36ae273460bd9b071d14cad19d4046c0e49690a4 Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Mon, 23 Mar 2015 15:07:51 +0100 Subject: [PATCH] check that emojione is defined before usage --- js/filters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/filters.js b/js/filters.js index 0e1246d..bc098c5 100644 --- a/js/filters.js +++ b/js/filters.js @@ -144,7 +144,7 @@ weechat.filter('getBufferQuickKeys', function () { // Emojifis the string using https://github.com/Ranks/emojione weechat.filter('emojify', function() { return function(text, enable_JS_Emoji) { - if (enable_JS_Emoji === true) { + if (enable_JS_Emoji === true && window.emojione !== undefined) { return emojione.unicodeToImage(text); } else { return(text);