Skip to content

Commit

Permalink
[Fix] .disposed should be nonenumerable
Browse files Browse the repository at this point in the history
Fixes #8.
  • Loading branch information
ljharb committed May 28, 2024
1 parent fa59c73 commit 9c3aeed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AsyncDisposableStack/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var isDisposed = callBind(disposed);
if (supportsDescriptors) {
DefinePropertyOrThrow(AsyncDisposableStack.prototype, 'disposed', {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Enumerable]]': false,
'[[Get]]': disposed
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion DisposableStack/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var isDisposed = callBind(disposed);
if (supportsDescriptors) {
DefinePropertyOrThrow(DisposableStack.prototype, 'disposed', {
'[[Configurable]]': true,
'[[Enumerable]]': true,
'[[Enumerable]]': false,
'[[Get]]': disposed
});
} else {
Expand Down
4 changes: 2 additions & 2 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
desc,
{
configurable: true,
enumerable: true,
enumerable: false,
get: desc.get,
set: undefined
},
Expand Down Expand Up @@ -336,7 +336,7 @@ module.exports = {
desc,
{
configurable: true,
enumerable: true,
enumerable: false,
get: desc.get,
set: undefined
},
Expand Down

0 comments on commit 9c3aeed

Please sign in to comment.