2009/dap/ReSpec.js/js respec.js,1.189,1.190

Update of /sources/public/2009/dap/ReSpec.js/js
In directory hutz:/tmp/cvs-serv15008

Modified Files:
	respec.js 
Log Message:
Fix two uses of console.log that didn't first check for the existence of console.log (broke compat with IE<10).

Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -d -r1.189 -r1.190
--- respec.js	22 May 2012 15:36:13 -0000	1.189
+++ respec.js	25 Jul 2012 19:59:20 -0000	1.190
@@ -2669,11 +2669,13 @@
 
     writeDatatype:    function (dt) {
         // if (/sequence/.test(dt) || /dict/.test(dt)) {
-            console.log(dt);
+        // [tleithea - fix for IE<10 (which does not have the console object present by default)]
+        if (typeof (console) != "undefined" && console.log) console.log(dt);
         // }
         var matched = /^sequence<(.+)>$/.exec(dt);
         if (matched) {
-            console.log("MATCHED!", matched[1])
+            // [tleithea - similar fix as noted just above]
+            if (typeof (console) != "undefined" && console.log) console.log("MATCHED!", matched[1]);
             return "sequence&lt;<a>" + matched[1] + "</a>&gt;";
         }
         else {

Received on Wednesday, 25 July 2012 19:59:23 UTC