Skip to content

Commit

Permalink
Improve runGetter performance by avoiding preventable exceptions (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimrandomh authored Mar 29, 2021
1 parent 389322c commit 26316b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/runtime/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ function makeUniqueKey() {

function runGetter(entry, name) {
var getter = entry.getters[name];
if (!getter) return GETTER_ERROR;
try {
var result = getter();
++getter.runCount;
Expand Down

0 comments on commit 26316b9

Please sign in to comment.