Skip to content

Commit

Permalink
fix: invalidate snap cache when property is removed from object
Browse files Browse the repository at this point in the history
  • Loading branch information
Juyeong-Byeon committed Jun 9, 2023
1 parent 3ad457d commit a45caf3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ const buildProxyFunction = (
const handler: ProxyHandler<T> = {
deleteProperty(target: T, prop: string | symbol) {
const prevValue = Reflect.get(target, prop)
snapCache.delete(target as Object)
removePropListener(prop)
const deleted = Reflect.deleteProperty(target, prop)
if (deleted) {
Expand Down

0 comments on commit a45caf3

Please sign in to comment.