Commit 263af0d
authored
fix: remove invalid WeakSet.clear() call from resetRegistration() (#530)
WeakSet does not have a .clear() method in JavaScript.
The previous call would throw a TypeError at runtime.
This is intentional because:
1. WeakSet entries are garbage-collected automatically when the
referenced object is no longer reachable.
2. Module hot-reload triggers a fresh module state, creating a new
_registeredApis WeakSet automatically.
3. The existing comment already documented the design intent.1 parent adb621e commit 263af0d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4139 | 4139 | | |
4140 | 4140 | | |
4141 | 4141 | | |
4142 | | - | |
| 4142 | + | |
4143 | 4143 | | |
4144 | 4144 | | |
4145 | 4145 | | |
0 commit comments