From ec9f76090a475d0684842dd555493ee926cb6422 Mon Sep 17 00:00:00 2001 From: atomcat1978 Date: Tue, 11 Feb 2014 19:21:22 +0100 Subject: [PATCH] IE 9 console problem Console message fails under IE - in that browser console is only defined if dev tools are opened. --- svg.import.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/svg.import.js b/svg.import.js index cb4ecb3..2d15c30 100644 --- a/svg.import.js +++ b/svg.import.js @@ -192,7 +192,8 @@ if (this._importStore[key]) { var oldKey = key key += Math.round(Math.random() * 1e16) - console.warn('Encountered duplicate id "' + oldKey + '". Changed store key to "' + key + '".') + if(console && console.log) + console.warn('Encountered duplicate id "' + oldKey + '". Changed store key to "' + key + '".') } this._importStore[key] = element