Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e517b03

Browse filesBrowse files
BridgeARtargos
authored andcommitted
process: hide NodeEnvironmentFlagsSet's add function
This makes sure that the `add` function is not visible by default when inspecting `process.allowedNodeEnvironmentFlags`. PR-URL: #28206 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 993c0db commit e517b03
Copy full SHA for e517b03

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/process/per_thread.js‎

Copy file name to clipboardExpand all lines: lib/internal/process/per_thread.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ function buildAllowedFlags() {
263263

264264
// The super constructor consumes `add`, but
265265
// disallow any future adds.
266-
this.add = () => this;
266+
Object.defineProperty(this, 'add', {
267+
value: () => this
268+
});
267269
}
268270

269271
delete() {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.