menu handlers are not necessary promises

This commit is contained in:
Nils Maier 2019-08-26 02:40:54 +02:00
parent 8235af22db
commit 572bab27a0

View File

@ -378,7 +378,10 @@ locale.then(() => {
console.error("Invalid Handler for", menuItemId);
return;
}
handler.call(this, info, tab).catch(console.error);
const rv = handler.call(this, info, tab);
if (rv && rv.catch) {
rv.catch(console.error);
}
}
async enumulate(action: string) {