From 75022497728f9b3f3eb3ca4f40192a70d3885685 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 17 Jan 2013 08:07:28 -0500 Subject: [PATCH] minor changes --- lib/util.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/util.js b/lib/util.js index 5e43be92..f28ab4b3 100644 --- a/lib/util.js +++ b/lib/util.js @@ -96,7 +96,7 @@ Util = exports || {}; var lArg = pArg, lConsole = Scope.console, lDate = '[' + Util.getDate() + '] '; - + if(lConsole && pArg) lConsole.log(lDate, lArg); @@ -136,7 +136,11 @@ Util = exports || {}; }; Util.replaceStr = function(pStr, pFrom, pTo){ - var lRet = pStr.replace(new RegExp(pFrom, 'g'), pTo); + var lRet; + + if(pStr && pFrom && pTo) + lRet = pStr.replace(new RegExp(pFrom, 'g'), pTo); + return lRet; };