Explorar o código

Merge pull request #1524 from smeda/issue1520

Fixes #1520 Check for null object before accessing it

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman %!s(int64=13) %!d(string=hai) anos
pai
achega
3b10a02f1a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      esp/files/scripts/configmgr/configmgr.js

+ 1 - 1
esp/files/scripts/configmgr/configmgr.js

@@ -3478,7 +3478,7 @@ function updateParams(record, attrName, oldValue, newValue, updateAttr, prevVal,
           }
           record.setData(subrec, sub);
         }
-        else {
+        else if (sub){
           var sparams = sub.params;
           var newsparams = updateParams(null, attrName, oldValue, newValue, updateAttr, prevVal, updateVal, sparams);
           if (newsparams.length > 0)