Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Dec 23, 2021
1 parent 30c2688 commit 1c23f51
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}

var own = Object.getOwnPropertyDescriptor(target, property);
if (own && (own.get || own.set)) {
// Prevent overriding
delete desc.writable;
delete desc.initializer;
}

if (desc.initializer === void 0) {
Object.defineProperty(target, property, desc);
desc = null;
Expand Down

1 comment on commit 1c23f51

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 1c23f51 Previous: d98a593 Ratio
full_es2015 188101103 ns/iter (± 7180020) 197630237 ns/iter (± 26248953) 0.95
full_es2016 155176564 ns/iter (± 5779547) 160317381 ns/iter (± 22583598) 0.97
full_es2017 159383993 ns/iter (± 7311212) 172343610 ns/iter (± 27596797) 0.92
full_es2018 160513757 ns/iter (± 8516215) 168515236 ns/iter (± 20494918) 0.95
full_es2019 159989121 ns/iter (± 9213954) 164372113 ns/iter (± 20465864) 0.97
full_es2020 162364227 ns/iter (± 11207355) 173589841 ns/iter (± 28065618) 0.94
full_es3 227126912 ns/iter (± 10521348) 238581924 ns/iter (± 33198996) 0.95
full_es5 200663453 ns/iter (± 9829396) 206494189 ns/iter (± 34438515) 0.97
parser 683644 ns/iter (± 20111) 697580 ns/iter (± 157160) 0.98

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.