Skip to content
Merged
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
lib: refactor to use primordials in lib/assert.js
  • Loading branch information
marsonya committed Jan 26, 2022
commit 788f2831ec41b53259c201cb69ca99e3a278fe6c
4 changes: 2 additions & 2 deletions lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -965,10 +965,10 @@ assert.ifError = function ifError(err) {
// This will remove any duplicated frames from the error frames taken
// from within `ifError` and add the original error frames to the newly
// created ones.
const origStackStart = origStack.indexOf('\n at');
const origStackStart = StringPrototypeIndexOf(origStack, '\n at');
if (origStackStart !== -1) {
const originalFrames = StringPrototypeSplit(
origStack.slice(origStackStart + 1),
StringPrototypeSlice(origStack, origStackStart + 1),
'\n'
);
// Filter all frames existing in err.stack.
Expand Down