From 4508efb9a695a97f19cf99ccb6155c55f9be5f0d Mon Sep 17 00:00:00 2001 From: siikamiika Date: Sun, 9 Feb 2020 22:41:20 +0200 Subject: stop clipboard monitor before starting it again --- ext/bg/js/clipboard-monitor.js | 2 ++ 1 file changed, 2 insertions(+) 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. -- cgit v1.2.3