From b1e0e31a9eccf556411c5934aca388461eaf1a6a Mon Sep 17 00:00:00 2001 From: McMatts Date: Thu, 26 Apr 2018 13:44:41 +0100 Subject: [PATCH] Prettify code --- gui/app/components/document/view-content.js | 2 ++ gui/app/components/toolbar/nav-bar.js | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) 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')) {