Skip to content

Commit

Permalink
Add guard-clause to clearDirty method (#16404)
Browse files Browse the repository at this point in the history
* Add guard-clause to clearDirty method

* Update utilities.js

* grunt build

---------

Co-authored-by: Jason Coward <jason@opengeek.com>
  • Loading branch information
sebastian-marinescu and opengeek committed May 23, 2023
1 parent b16a856 commit 39a5672
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manager/assets/modext/modx.jsgrps-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manager/assets/modext/util/utilities.js
Expand Up @@ -82,7 +82,7 @@ Ext.override(Ext.form.NumberField, {
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 39a5672

Please sign in to comment.