Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

In prepareValue, guard debug check against null property access #752

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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