GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — util: fix crashing when emitting new Buffer() deprecation warning #53075 · nodejs/node@c55e72e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal
    • util.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/util.js‎

Copy file name to clipboardExpand all lines: lib/internal/util.js
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const {
3737
SafeWeakRef,
3838
StringPrototypeIncludes,
3939
StringPrototypeReplace,
40+
StringPrototypeStartsWith,
4041
StringPrototypeToLowerCase,
4142
StringPrototypeToUpperCase,
4243
Symbol,
@@ -515,11 +516,14 @@ function isInsideNodeModules() {
515516
if (ArrayIsArray(stack)) {
516517
for (const frame of stack) {
517518
const filename = frame.getFileName();
518-
// If a filename does not start with / or contain \,
519-
// it's likely from Node.js core.
519+
520520
if (
521-
filename[0] !== '/' &&
522-
StringPrototypeIncludes(filename, '\\') === false
521+
filename == null ||
522+
StringPrototypeStartsWith(filename, 'node:') === true ||
523+
(
524+
filename[0] !== '/' &&
525+
StringPrototypeIncludes(filename, '\\') === false
526+
)
523527
) {
524528
continue;
525529
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.