Skip to content

Commit

Permalink
fix(document): don't double-call deeply nested custom getters when us…
Browse files Browse the repository at this point in the history
…ing `get()`

Fix #6779
Re: #6637
  • Loading branch information
vkarpov15 committed Jul 28, 2018
1 parent 695cb6f commit 12e0d09
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/document.js
Expand Up @@ -1115,6 +1115,8 @@ Document.prototype.get = function(path, type, options) {
obj = void 0;
} else if (obj instanceof Map) {
obj = obj.get(pieces[i]);
} else if (i === l - 1) {
obj = utils.getValue(pieces[i], obj);
} else {
obj = obj[pieces[i]];
}
Expand Down

0 comments on commit 12e0d09

Please sign in to comment.