Skip to content

Commit

Permalink
util: Handle null cached properties when updating properties
Browse files Browse the repository at this point in the history
Closes: #386
  • Loading branch information
3v1n0 committed Feb 24, 2023
1 parent c4a4604 commit 882b8ca
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions util.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ async function queueProxyPropertyUpdate(proxy, propertyName, value, params) {
cancellable: null,
});

if (!params.skipEqualityCheck &&
value.equal(proxy.get_cached_property(propertyName)))
return;
if (!params.skipEqualityCheck) {
const cachedProperty = proxy.get_cached_property(propertyName);

if (value && cachedProperty &&
value.equal(proxy.get_cached_property(propertyName)))
return;
}

proxy.set_cached_property(propertyName, value);

Expand Down

0 comments on commit 882b8ca

Please sign in to comment.