We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5271c3 commit 94c60dbCopy full SHA for 94c60db
app/code/Magento/User/view/adminhtml/web/js/roles-tree.js
@@ -1,6 +1,6 @@
1
/**
2
- * Copyright © Magento, Inc. All rights reserved.
3
- * See COPYING.txt for license details.
+ * Copyright 2013 Adobe
+ * All rights reserved.
4
*/
5
6
@@ -97,9 +97,13 @@ define([
97
_destroy: function () {
98
this.element.jstree('destroy');
99
100
- this.buttons.forEach(function (element) {
101
- element.parentNode.removeChild(element);
102
- });
+ if (this.buttons) {
+ this.buttons.forEach(function (element) {
+ if (element && element.parentNode) {
103
+ element.parentNode.removeChild(element);
104
+ }
105
+ });
106
107
},
108
109
0 commit comments