aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/search.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 3d6024f0..de2bca64 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -244,6 +244,9 @@ class DisplaySearch extends Display {
}
startClipboardMonitor() {
+ // 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 this.getClipboardText()
+ // call will exit early if the reference has changed.
const token = {};
const intervalCallback = async () => {
this.clipboardMonitorTimerId = null;