Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/prefab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ class Prefab implements PrefabInterface {
projectEnvId: ProjectEnvId,
defaultContext: Contexts
): void {
// Create resolver with a temporary no-op onUpdate for its construction phase
const tempResolver = new Resolver(
configs,
projectEnvId,
Expand All @@ -237,7 +236,6 @@ class Prefab implements PrefabInterface {

this.configChangeNotifier.init(tempResolver);

// Define the actual combined onUpdate callback
const actualCombinedOnUpdate = (
updatedConfigs: Array<Config | MinimumConfig>
): void => {
Expand All @@ -246,9 +244,11 @@ class Prefab implements PrefabInterface {
};

tempResolver.setOnUpdate(actualCombinedOnUpdate);

// Assign the fully configured resolver to the Prefab instance
this.resolver = tempResolver;

if (configs.length > 0) {
actualCombinedOnUpdate(configs);
}
}

async init({
Expand Down