From 814d41f9b272306dd2519a51ba0c7312bdc47089 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Thu, 27 Aug 2020 13:35:28 +0200 Subject: [PATCH] fix: componentView: do not throw on inactive editors --- app/assets/javascripts/directives/views/componentView.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/directives/views/componentView.ts b/app/assets/javascripts/directives/views/componentView.ts index 3385b0de8..ec0a247a7 100644 --- a/app/assets/javascripts/directives/views/componentView.ts +++ b/app/assets/javascripts/directives/views/componentView.ts @@ -90,10 +90,10 @@ class ComponentViewCtrl implements ComponentViewScope { private loadComponent() { if (!this.component) { - throw 'Component view is missing component'; + throw Error('Component view is missing component'); } - if (!this.component.active) { - throw 'Component view component must be active'; + if (!this.component.active && !this.component.isEditor()) { + throw Error('Component view component must be active'); } const iframe = this.application.componentManager!.iframeForComponent( this.componentUuid