diff --git a/gui/app/components/document/view-content.js b/gui/app/components/document/view-content.js index 3f2426f4..3d3fe802 100644 --- a/gui/app/components/document/view-content.js +++ b/gui/app/components/document/view-content.js @@ -252,6 +252,8 @@ export default Component.extend(TooltipMixin, { }, onHideSectionWizard() { + if (this.get('isDestroyed') || this.get('isDestroying')) return; + this.set('newSectionLocation', ''); this.set('beforePage', null); $("#new-section-wizard").insertAfter('#wizard-placeholder'); diff --git a/gui/app/components/toolbar/nav-bar.js b/gui/app/components/toolbar/nav-bar.js index 5bae465f..9ae55abf 100644 --- a/gui/app/components/toolbar/nav-bar.js +++ b/gui/app/components/toolbar/nav-bar.js @@ -69,9 +69,7 @@ export default Component.extend(ModalMixin, { }, setupPins() { - if (this.get('isDestroyed') || this.get('isDestroying')) { - return; - } + if (this.get('isDestroyed') || this.get('isDestroying')) return; this.get('pinned').getUserPins().then((pins) => { if (this.get('isDestroyed') || this.get('isDestroying')) {