aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-02-09 22:41:20 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2020-02-09 22:41:20 +0200
commit4508efb9a695a97f19cf99ccb6155c55f9be5f0d (patch)
treef34d2d536baba1498751d59667b7b831390b9029 /ext/bg/js
parentd4e74a05723b1b4347c51606bcee61dc72e34e51 (diff)
stop clipboard monitor before starting it again
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/clipboard-monitor.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/bg/js/clipboard-monitor.js b/ext/bg/js/clipboard-monitor.js
index 579cdc56..b4a27fa2 100644
--- a/ext/bg/js/clipboard-monitor.js
+++ b/ext/bg/js/clipboard-monitor.js
@@ -30,6 +30,8 @@ class ClipboardMonitor {
}
start() {
+ this.stop();
+
// The token below is used as a unique identifier to ensure that a new clipboard monitor
// hasn't been started during the await call. The check below the await apiClipboardGet()
// call will exit early if the reference has changed.