diff --git a/src/Resources/public/js/pimcore/perspective/view.js b/src/Resources/public/js/pimcore/perspective/view.js index 53f412a..ec33b2a 100644 --- a/src/Resources/public/js/pimcore/perspective/view.js +++ b/src/Resources/public/js/pimcore/perspective/view.js @@ -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: {