Skip to content

Commit

Permalink
Fix(Regions): a timeout before region-created (#3971)
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh authored Dec 25, 2024
1 parent 1cd0192 commit 7008eb3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plugins/regions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,10 @@ class RegionsPlugin extends BasePlugin<RegionsPluginEvents, RegionsPluginOptions

this.subscriptions.push(...regionSubscriptions)

this.emit('region-created', region)
// A small timeout to allow internal events to be emitted first
setTimeout(() => {
this.emit('region-created', region)
}, 0)
}

/** Create a region with given parameters */
Expand Down

0 comments on commit 7008eb3

Please sign in to comment.