Browse Source

Fixes error with ie 9

The old line console.log produces error in ie because "console" is only
active if you opened developer tools with 'f12'
ardiman 11 years ago
parent
commit
928e71f36a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      assets/scripts/foreground.js

+ 2 - 1
assets/scripts/foreground.js

@@ -5,7 +5,8 @@ jQuery(document).ready(function() {
 
 
   jQuery(document).foundation(function (response) {
-    console.log(response.errors);
+    // console.log(response.errors); < this line will produce error in ie9!
+    if (window.console) console.log(response.errors);
   });
 
   jQuery('[id^=ca-nstab] a').addClass('icon-file').text(' ' + jQuery('[id^=ca-nstab] a').text());