Skip to content

Commit

Permalink
#603@patch: Fixes problem in the "global-registrator" package where u…
Browse files Browse the repository at this point in the history
…nregister only deletes/pops half the registered keys
  • Loading branch information
luca992 committed Oct 10, 2022
1 parent 9c0f9b7 commit 2fc01b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/global-registrator/src/GlobalRegistrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export default class GlobalRegistrator {
'Failed to unregister. Happy DOM has not previously been globally registered.'
);
}
for (const key of this.registered) {
while (this.registered.length) {
const key = this.registered.pop();
delete global[key];
this.registered.pop();
}
}
}

0 comments on commit 2fc01b1

Please sign in to comment.