Silence some spurious warnings on null and ""

This commit is contained in:
Nathan Gray 2015-04-16 16:19:41 +00:00
parent c6bfc44d08
commit 611c35fc5f
2 changed files with 6 additions and 2 deletions

View File

@ -62,7 +62,11 @@ var et2_vfs = et2_valueWidget.extend([et2_IDetachedDOM],
set_value: function(_value) {
if (typeof _value !== 'object')
{
this.egw().debug("warn", "%s only has path, needs full array", this.id, _value);
// Only warn if it's an actual value, just blank for falsy values
if(_value)
{
this.egw().debug("warn", "%s only has path, needs full array", this.id, _value);
}
this.span.empty().text(_value);
return;
}

View File

@ -59,7 +59,7 @@ egw.extend('lang', egw.MODULE_GLOBAL, function() {
*/
lang: function(_msg, _arg1)
{
if(typeof _msg !== "string")
if(typeof _msg !== "string" && _msg)
{
egw().debug("warn", "Cannot translate an object", _msg);
return _msg;