Kaynağa Gözat

Make `apply` module function async

This will allow us to support async module loading required for ES
modules support.

GitOrigin-RevId: bfd925c94ca3b6df8f75f704e21164a546973f5f
andrew rumble 2 yıl önce
ebeveyn
işleme
46317a9b9c

+ 1 - 1
services/web/app/src/infrastructure/Modules.js

@@ -68,7 +68,7 @@ const loadModules = _.memoize(loadModulesImpl)
 async function applyRouter(webRouter, privateApiRouter, publicApiRouter) {
 async function applyRouter(webRouter, privateApiRouter, publicApiRouter) {
   for (const module of await modules()) {
   for (const module of await modules()) {
     if (module.router && module.router.apply) {
     if (module.router && module.router.apply) {
-      module.router.apply(webRouter, privateApiRouter, publicApiRouter)
+      await module.router.apply(webRouter, privateApiRouter, publicApiRouter)
     }
     }
   }
   }
 }
 }