diff --git a/o2web/source/o2_core/o2/xScript/CMSEnvironment.js b/o2web/source/o2_core/o2/xScript/CMSEnvironment.js index 8fdd546a3fa4bbcb7f5beaec946cb56dd0afd774..f8cb1636503a7108801d489c3de885d265f57c69 100644 --- a/o2web/source/o2_core/o2/xScript/CMSEnvironment.js +++ b/o2web/source/o2_core/o2/xScript/CMSEnvironment.js @@ -13,8 +13,9 @@ MWF.xScript.CMSEnvironment = function(ev){ return new MWF.xScript.CMSJSONData(jData, function(data, key, _self){ var p = {"getKey": function(){return key;}, "getParent": function(){return _self;}}; while (p && !_forms[p.getKey()]) p = p.getParent(); - if (p) if (p.getKey()) if (_forms[p.getKey()]) _forms[p.getKey()].resetData(); - }); + var k = (p) ? p.getKey() : ""; + if (k) if(_forms[k]) if(_forms[k].resetData) _forms[k].resetData(); + }, "", null, _form); }; this.setData = function(data){ this.data = getJSONData(data);