From: Leif Åstrand Date: Mon, 19 Dec 2011 10:48:33 +0000 (+0200) Subject: Logging from bootstrap only if debug is enabled X-Git-Tag: 7.0.0.alpha1~118 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dcb22a0e3e621ba6f39fccbf4898148644cecd39;p=vaadin-framework.git Logging from bootstrap only if debug is enabled --- diff --git a/WebContent/VAADIN/vaadinBootstrap.js b/WebContent/VAADIN/vaadinBootstrap.js index 5728903545..19da0cfc5a 100644 --- a/WebContent/VAADIN/vaadinBootstrap.js +++ b/WebContent/VAADIN/vaadinBootstrap.js @@ -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