Skip to content

Commit

Permalink
perf(index): use optional chaining (#47)
Browse files Browse the repository at this point in the history
Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
  • Loading branch information
Fdawgs authored Dec 30, 2024
1 parent bf39371 commit 7463f4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function safeRegex (re, opts) {
if (!ok) return false
}
}
const stack = node.stack || (node.value && node.value.stack)
const stack = node.stack || node.value?.stack
if (!stack) return true

for (i = 0; i < stack.length; i++) {
Expand Down

0 comments on commit 7463f4d

Please sign in to comment.