Skip to content

Commit

Permalink
Add guard-clause to clearDirty method [2.x]
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-marinescu committed Sep 4, 2023
1 parent fbf1266 commit 242b4ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manager/assets/modext/util/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Ext.reg('modx-lockmask',MODx.LockMask);
Ext.override(Ext.form.BasicForm,{
clearDirty : function(nodeToRecurse){
nodeToRecurse = nodeToRecurse || this;
nodeToRecurse.items.each(function(f){
nodeToRecurse?.items?.each?.(function(f){
if (!f.getValue) return;

if(f.items){
Expand Down

0 comments on commit 242b4ec

Please sign in to comment.