diff --git a/lib/util.js b/lib/util.js index 40ed38ca..1d27d92b 100644 --- a/lib/util.js +++ b/lib/util.js @@ -861,15 +861,16 @@ * @param pFileName * @return Ext */ - this.getExtension = function(pFileName) { - var lRet, lDot; + this.getExtension = function(name) { + var ret, dot, + isStr = Util.isString(name); - if ( Util.isString(pFileName) ) { - lDot = pFileName.lastIndexOf('.'); - lRet = pFileName.substr(lDot); + if (isStr) { + dot = name.lastIndexOf('.'); + ret = name.substr(dot); } - return lRet; + return ret; }; /**