Skip to content

Commit

Permalink
Merge pull request #32 from deliamcginnis/pca/admin
Browse files Browse the repository at this point in the history
Check input elements exist
  • Loading branch information
Matthew Garde authored Feb 19, 2020
2 parents 6b24f12 + 0ec6a61 commit a861359
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion view/adminhtml/templates/customer_index_edit_script.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
pca.magento.currentUrl = window.location.href;

pca.magento.isElementVisible = function( elem ) {
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
if (elem) {
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
}
return false;
};

var backup = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
pca.magento = pca.magento || {};

pca.magento.isElementVisible = function( elem ) {
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
if (elem) {
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
}
return false;
};

var fieldsToPopulate = [];
Expand Down

0 comments on commit a861359

Please sign in to comment.