Skip to content

Commit

Permalink
Merge pull request #479 from searchspring/fix-duplicate-controllers
Browse files Browse the repository at this point in the history
fix(snap-preact): move controller import outside of conditional
  • Loading branch information
dkonieczek authored May 4, 2022
2 parents fbbb773 + 340b1f4 commit 97ff5ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/snap-preact/src/Snap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {}),
Expand Down

0 comments on commit 97ff5ce

Please sign in to comment.