Skip to content

Commit

Permalink
Fix blocking functions in the emulator when using multiple codebases (#…
Browse files Browse the repository at this point in the history
…6504)

* fix emulator bug

* Add changelog entry
  • Loading branch information
colerogers committed Nov 9, 2023
1 parent 5bca9b5 commit 55d3584
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix blocking functions in the emulator when using multiple codebases (#6504).
4 changes: 2 additions & 2 deletions src/emulator/functionsEmulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,6 @@ export class FunctionsEmulator implements EmulatorInstance {
} else {
this.workerPools[emulatableBackend.codebase].refresh();
}
// reset blocking functions config for reloads
this.blockingFunctionsConfig = {};

// When force is true we set up all triggers, otherwise we only set up
// triggers which have a unique function name
Expand Down Expand Up @@ -1436,6 +1434,8 @@ export class FunctionsEmulator implements EmulatorInstance {

async reloadTriggers() {
this.triggerGeneration++;
// reset blocking functions config for reloads
this.blockingFunctionsConfig = {};
for (const backend of this.args.emulatableBackends) {
await this.loadTriggers(backend);
}
Expand Down

0 comments on commit 55d3584

Please sign in to comment.