Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Commit d9dd7ca

Browse files
author
olinde
committed
fix: await incoming configs onInit
The incoming configs onInit functions may be async, so we should await them.
1 parent 2790bab commit d9dd7ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ export const cloudStorage =
8686

8787
return existingCollection
8888
}),
89-
onInit: payload => {
89+
onInit: async payload => {
9090
initFunctions.forEach(fn => fn())
91-
if (config.onInit) config.onInit(payload)
91+
if (config.onInit) await config.onInit(payload)
9292
},
9393
}
9494
}

0 commit comments

Comments
 (0)