From fc78253ef25b844b7079f7b19cbd7228b1fe2851 Mon Sep 17 00:00:00 2001 From: Mark Vayngrib Date: Mon, 18 May 2015 10:37:00 -0400 Subject: [PATCH] conditional debugging --- UdpSocket.ios.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/UdpSocket.ios.js b/UdpSocket.ios.js index 1d9c308..bc81a2d 100644 --- a/UdpSocket.ios.js +++ b/UdpSocket.ios.js @@ -47,9 +47,11 @@ inherits(UdpSocket, EventEmitter) UdpSocket.prototype._debug = function() { // for now - var args = [].slice.call(arguments) - args.unshift('socket-' + this._id) - console.log.apply(console, args) + if (typeof DEBUG !== 'undefined' && DEBUG) { + var args = [].slice.call(arguments) + args.unshift('socket-' + this._id) + console.log.apply(console, args) + } } UdpSocket.prototype.bind = function(port, address, callback) {