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 807b838
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Resources/public/js/pimcore/perspective/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ 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({
url: this.routePrefix + '/update',
params: {
Expand Down

0 comments on commit 807b838

Please sign in to comment.