Преглед на файлове

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 години
родител
ревизия
928e71f36a
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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) {
   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());
   jQuery('[id^=ca-nstab] a').addClass('icon-file').text(' ' + jQuery('[id^=ca-nstab] a').text());