diff --git a/src/composables/useLaunchDarkly.ts b/src/composables/useLaunchDarkly.ts index fd969aeb..12a9d07b 100644 --- a/src/composables/useLaunchDarkly.ts +++ b/src/composables/useLaunchDarkly.ts @@ -16,6 +16,7 @@ async function loadDeps () { } } catch (e) { // ignore failure to import as it's an optional dependency + console.error(e) } } } @@ -33,6 +34,10 @@ export default function useLaunchDarkly () { return } + if (!ldModule) { + await loadDeps() + } + try { ldClient = ldModule.initialize( featuresetId.value,