Skip to content

Commit

Permalink
Ensure getter/setter are called with proper context
Browse files Browse the repository at this point in the history
Related issue:
- uBlockOrigin/uAssets#9110
  • Loading branch information
gorhill committed May 18, 2021
1 parent 9e394aa commit e4b8f2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/resources/scriptlets.js
Expand Up @@ -81,13 +81,13 @@
get: function() {
validate();
return desc instanceof Object
? desc.get()
? desc.get.call(owner)
: value;
},
set: function(a) {
validate();
if ( desc instanceof Object ) {
desc.set(a);
desc.set.call(owner, a);
} else {
value = a;
}
Expand Down

0 comments on commit e4b8f2e

Please sign in to comment.