Skip to content

Commit 622a92b

Browse files
committed
Catch errors in features with async init functions
enableFeature has a try/catch that helps show which feature fails. Init function however were not awaited so this only caught sync features with sync init functions. This change does not affect enableFeature's core feature since errors are still caught and since enableFeature() itself is never awaited. Before: https://i.imgur.com/33njqSI.png After: https://i.imgur.com/Y5R4Dqi.png
1 parent 7fce495 commit 622a92b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/libs/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const enableFeature = async fn => {
3939
return;
4040
}
4141
try {
42-
fn();
42+
await fn();
4343
log('✅', filename);
4444
} catch (err) {
4545
console.log('❌', filename);

0 commit comments

Comments
 (0)