소스 검색

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) {
-    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());