diff options
author | Alex Yatskov <alex@foosoft.net> | 2019-11-05 19:04:13 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2019-11-05 19:04:13 -0800 |
commit | 08ad2779678cd447bd747c2b155ef9b5135fdf5d (patch) | |
tree | faa54cbf9176989f9bd3c3b90ff3e032189adb20 /ext/bg/js/settings-popup-preview.js | |
parent | 438498435227cfa59cf9ed3430045b288cd2a7c0 (diff) | |
parent | 91c01e0a7eeeb851344a22ace8a5fa0b873a3e57 (diff) |
Merge branch 'master' into testing
Diffstat (limited to 'ext/bg/js/settings-popup-preview.js')
-rw-r--r-- | ext/bg/js/settings-popup-preview.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/bg/js/settings-popup-preview.js b/ext/bg/js/settings-popup-preview.js index b12fb726..7d641c46 100644 --- a/ext/bg/js/settings-popup-preview.js +++ b/ext/bg/js/settings-popup-preview.js @@ -159,8 +159,11 @@ class SettingsPopupPreview { range.selectNode(textNode); const source = new TextSourceRange(range, range.toString(), null); - this.frontend.textSourceLast = null; - await this.frontend.searchSource(source, 'script'); + try { + await this.frontend.searchSource(source, 'script'); + } finally { + source.cleanup(); + } await this.frontend.lastShowPromise; if (this.frontend.popup.isVisible()) { |