From 340b1f4fd4db15e5d1f6c4d6971dc6fe67dce918 Mon Sep 17 00:00:00 2001 From: Dennis Konieczek Date: Wed, 4 May 2022 12:45:17 -0400 Subject: [PATCH] fix(snap-preact): move controller import outside of conditional --- packages/snap-preact/src/Snap.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/snap-preact/src/Snap.tsx b/packages/snap-preact/src/Snap.tsx index 7c79f776d..bcec9b31d 100644 --- a/packages/snap-preact/src/Snap.tsx +++ b/packages/snap-preact/src/Snap.tsx @@ -183,9 +183,9 @@ export class Snap { break; } - if (!this.controllers[config.id]) { - const creationFunc: (config: SnapControllerConfigs, services: SnapControllerServices) => Controllers = (await importPromise).default; + const creationFunc: (config: SnapControllerConfigs, services: SnapControllerServices) => Controllers = (await importPromise).default; + if (!this.controllers[config.id]) { this.controllers[config.id] = creationFunc( { url: deepmerge(this.config.url || {}, urlConfig || {}),