]> source.dussan.org Git - vaadin-framework.git/commitdiff
Logging from bootstrap only if debug is enabled
authorLeif Åstrand <leif@vaadin.com>
Mon, 19 Dec 2011 10:48:33 +0000 (12:48 +0200)
committerLeif Åstrand <leif@vaadin.com>
Mon, 19 Dec 2011 10:57:54 +0000 (12:57 +0200)
WebContent/VAADIN/vaadinBootstrap.js

index 572890354592e43abef5110ff7369ec824e86814..19da0cfc5a75c49cb449eea1134460fe2158c45b 100644 (file)
@@ -6,7 +6,7 @@
        
        
     var log;
-    if (typeof console === "undefined") {
+    if (typeof console === "undefined" || !window.location.search.match(/[&?]debug(&|$)/)) {
        //If no console.log present, just use a no-op
        log = function() {};
     } else if (typeof console.log === "function") {
@@ -97,7 +97,6 @@
                                        if (r.readyState == 4) {
                                                if (r.status == 200){
                                                        log("Got root config response", r.responseText);
-                                                       // TODO Does this work in all supported browsers?
                                                        var updatedConfig = JSON.parse(r.responseText);
                                                        
                                                        // Copy new properties to the config object