Skip to content

Commit

Permalink
fixed get method
Browse files Browse the repository at this point in the history
  • Loading branch information
MartyJRE committed Apr 8, 2024
1 parent 60e21c9 commit 162dfff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ Traverse.prototype.get = function (ps) {
var node = this.value;
for (var i = 0; node && i < ps.length; i++) {
var key = ps[i];
if (!!hasOwnProperty.call(node, key) || (!this.options.includeSymbols && typeof key === 'symbol')) {
if (
!hasOwnProperty.call(node, key)
|| (!this.options.includeSymbols && typeof key === 'symbol')
) {
return void undefined;
}
node = node[key];
Expand Down

0 comments on commit 162dfff

Please sign in to comment.