summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Gutierrez <ogutierrez@redhat.com>2016-09-05 10:48:06 +0200
committerPavel Grunt <pgrunt@redhat.com>2016-09-06 18:13:03 +0200
commit53b6063f51f1d5439b2be6c5633aa8fbf88e6221 (patch)
treed4e1993be56f958ff739d9aaf5fa0cbb008ad839
parent579f2bfb27475395b08c63f151fdce73d4bbb5f7 (diff)
Added debug filtering to avoid debugger to start when using in production
-rw-r--r--spiceconn.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/spiceconn.js b/spiceconn.js
index 9707818..010a446 100644
--- a/spiceconn.js
+++ b/spiceconn.js
@@ -23,7 +23,7 @@
** This is the base Javascript class for establishing and
** managing a connection to a Spice Server.
** It is used to provide core functionality to the Spice main,
-** display, inputs, and cursor channels. See main.js for
+** display, inputs, and cursor channels. See main.js for
** usage.
**--------------------------------------------------------------------------*/
function SpiceConn(o)
@@ -189,8 +189,8 @@ SpiceConn.prototype =
if (msg.type > 500)
{
- alert("Something has gone very wrong; we think we have message of type " + msg.type);
- debugger;
+ DEBUG > 0 && alert("Something has gone very wrong; we think we have message of type " + msg.type);
+ DEBUG > 0 && debugger;
}
if (msg.size == 0)