mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Switch to asych/await where useful
This commit is contained in:
parent
372ee755f7
commit
10413a89c3
11 changed files with 269 additions and 349 deletions
|
@ -13,10 +13,11 @@
|
|||
}
|
||||
|
||||
let settings = false;
|
||||
scope.setSettings = function(realSettings){
|
||||
scope.setSettings = async function(realSettings){
|
||||
if (!settings){
|
||||
settings = realSettings;
|
||||
return settings.loaded.then(scope.clearQueue);
|
||||
await settings.loaded;
|
||||
return scope.clearQueue();
|
||||
}
|
||||
else {
|
||||
warning("logging: Settings can only be set once.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue