Skip to content

Commit 1fe0b69

Browse files
marsonyabengl
authored andcommitted
lib: refactor to use primordials in lib/assert.js
PR-URL: #41702 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Mestery <[email protected]>
1 parent fd7e4ab commit 1fe0b69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/assert.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -965,10 +965,10 @@ assert.ifError = function ifError(err) {
965965
// This will remove any duplicated frames from the error frames taken
966966
// from within `ifError` and add the original error frames to the newly
967967
// created ones.
968-
const origStackStart = origStack.indexOf('\n at');
968+
const origStackStart = StringPrototypeIndexOf(origStack, '\n at');
969969
if (origStackStart !== -1) {
970970
const originalFrames = StringPrototypeSplit(
971-
origStack.slice(origStackStart + 1),
971+
StringPrototypeSlice(origStack, origStackStart + 1),
972972
'\n'
973973
);
974974
// Filter all frames existing in err.stack.

0 commit comments

Comments
 (0)