Skip to content

Commit

Permalink
Checking if children is defined: for case if all custom views've been…
Browse files Browse the repository at this point in the history
… removed.
  • Loading branch information
vmalyk committed Sep 14, 2024
1 parent 09d0292 commit 8481c29
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Resources/public/js/pimcore/perspective/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ pimcore.bundle.perspectiveeditor.ViewEditor = class {
disabled: !pimcore.settings['custom-views-writeable'],
handler: function(){
const serializedViews = this.viewTreeStore.getRoot().serialize();
for (let child of serializedViews.children) {
if (child.config.classes && Array.isArray(child.config.classes)) {
child.config.classes = child.config.classes.join(',');
if (serializedViews.children !== undefined) {
for (let child of serializedViews.children) {
if (child.config.classes && Array.isArray(child.config.classes)) {
child.config.classes = child.config.classes.join(',');
}
}
}
Ext.Ajax.request({
Expand Down

0 comments on commit 8481c29

Please sign in to comment.