feature(cloudfunc) formatMsg: add empty name condition

This commit is contained in:
coderaiser 2013-10-18 08:57:57 +00:00
parent d849ecd168
commit 9fc5e88186

View file

@ -43,7 +43,8 @@ var Util, exports, CloudFunc = {};
CloudFunc.formatMsg = function(pMsg, pName, pStatus) {
var status = pStatus || 'ok',
msg = pMsg + ': ' + status + '("' + pName + '")';
name = !pName ? '': '("' + pName + '")',
msg = pMsg + ': ' + status + name;
return msg;
};