Skip to content

Commit 6669728

Browse files
committed
Merge pull request DrkSephy#79 from Xuefeng-Zhu/patch-1
update weakmap example
2 parents 56b1424 + d70c349 commit 6669728

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ let value = map.get(el); // 'reference'
894894
el.parentNode.removeChild(el);
895895
el = null;
896896

897-
value = map.get(el); // undefined
897+
// map is empty, since the element is destroyed
898898
```
899899

900900
As shown above, once the object is destroyed by the garbage collector,

0 commit comments

Comments
 (0)