From 678348d0600177ef5c58917adf0a743a0fc19441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Estev=C3=A3o=20Soares=20dos=20Santos?= Date: Sun, 31 May 2015 13:08:15 +0100 Subject: [PATCH] chore(helpers.js): add console polyfill so we can trigger warnings reliably --- src/helpers.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/helpers.js b/src/helpers.js index 1c1cbf3..eb2a6ff 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -105,3 +105,19 @@ showdown.helper.escapeCharacters = function escapeCharacters(text, charsToEscape return text; }; + +/** + * POLYFILLS + */ +if (showdown.helper.isUndefined(console)) { + console = { + warn: function (msg) { + 'use strict'; + alert(msg); + }, + log: function (msg) { + 'use strict'; + alert(msg); + } + }; +}