From f64c27ec7b994e655331bab316fde81106567fed Mon Sep 17 00:00:00 2001 From: ruanyl Date: Thu, 11 Feb 2016 23:21:08 +0200 Subject: [PATCH] fixed: popup overlay not removed when there is error --- src/octotree.js | 1 + src/view.help.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/octotree.js b/src/octotree.js index a45d368..b828913 100755 --- a/src/octotree.js +++ b/src/octotree.js @@ -105,6 +105,7 @@ $(document).ready(() => { adapter.getRepoFromPath(showInNonCodePage, currRepo, token, (err, repo) => { if (err) { showError(err) + helpPopup.clean() } else if (repo) { $toggler.show() diff --git a/src/view.help.js b/src/view.help.js index b5c4248..2f52194 100644 --- a/src/view.help.js +++ b/src/view.help.js @@ -4,6 +4,11 @@ class HelpPopup { this.store = store } + clean() { + const $view = this.$view + $view.remove() + } + show() { const $view = this.$view const store = this.store