Asynchronously wait for the writing to complete

This commit is contained in:
buzz-lightsnack-2007 2024-06-08 17:59:52 +08:00
parent ed47e40bd1
commit f38d690b57

View file

@ -136,9 +136,9 @@ class global {
: false;
// Write!
chrome.storage[(CLOUD > 0) ? `sync` : `local`].set(DATA_INJECTED);
await chrome.storage[(CLOUD > 0) ? `sync` : `local`].set(DATA_INJECTED);
GUI_INFO[`log`] ? GUI_INFO[`log`].clear() : false;
return ((OPTIONS[`verify`] != null ? (OPTIONS[`verify`]) : true) ? verify(DATA_NAME, data) : true);
return ((OPTIONS[`verify`] != null ? (OPTIONS[`verify`]) : true) ? await verify(DATA_NAME, data) : true);
}
/*