Skip to content

Commit 727a901

Browse files
committed
meta: Fix scope updates
1 parent c28c84e commit 727a901

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 5.27.6
8+
9+
- [hub] fix: Don't invoke scope updates in scope listeners
10+
711
## 5.27.5
812

913
- [hub] fix: Sync ScopeListeners (#3065)

packages/hub/src/scope.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,9 @@ export class Scope implements ScopeInterface {
438438
* This will be called on every set call.
439439
*/
440440
protected _notifyScopeListeners(): void {
441+
// We need this check for this._notifyingListeners to be able to work on scope during updates
442+
// If this check is not here we'll produce endless recursion when something is done with the scope
443+
// during the callback.
441444
if (!this._notifyingListeners) {
442445
this._notifyingListeners = true;
443446
this._scopeListeners.forEach(callback => {

0 commit comments

Comments
 (0)