Skip to content

Commit

Permalink
build dist
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed May 27, 2021
1 parent 5e42baa commit 40aa593
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
17 changes: 15 additions & 2 deletions dist/cjs/scriptlets.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,21 @@ function getPropertyInChain(base, chain) {
};
}

var prop = chain.slice(0, pos);
var nextBase = base[prop];
var prop = chain.slice(0, pos); // https://github.com/AdguardTeam/Scriptlets/issues/128

var nextBase = null;

if (base === null) {
// if base is null, return 'null' as base.
// it's needed for triggering the reason logging while debugging
return {
base: nextBase,
prop: prop,
chain: chain
};
}

nextBase = base[prop];
chain = chain.slice(pos + 1);

if (nextBase !== undefined) {
Expand Down
Loading

0 comments on commit 40aa593

Please sign in to comment.