Add comment describing what token is used for

This commit is contained in:
toasted-nutbread 2019-12-15 13:26:59 -05:00
parent 8b89e99eff
commit dec7f6cabb

View File

@ -244,6 +244,9 @@ class DisplaySearch extends Display {
} }
startClipboardMonitor() { 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 token = {};
const intervalCallback = async () => { const intervalCallback = async () => {
this.clipboardMonitorTimerId = null; this.clipboardMonitorTimerId = null;