Skip to content

Commit

Permalink
In prepareValue, guard debug check against null property access
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-pmb committed Mar 15, 2019
1 parent 76b55af commit 1e8397f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ function inspect(...args) {
}

function prepareValue(value) {
if (! Loader.state.package.default.options.debug &&
isStackTraceMaskable(value)) {
const defaultPkg = Loader.state.package.default || false
const defPkgOpt = defaultPkg.options || false
if (! defPkgOpt.debug && isStackTraceMaskable(value)) {
maskStackTrace(value)
}

Expand Down

0 comments on commit 1e8397f

Please sign in to comment.