Skip to content

Commit 3413a28

Browse files
authored
node:fs: fix leak of mkdir return value (oven-sh#21360)
1 parent 97a530d commit 3413a28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bun.js/node/node_fs.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,9 +3156,9 @@ pub const StringOrUndefined = union(enum) {
31563156
string: bun.String,
31573157
none: void,
31583158

3159-
pub fn toJS(this: *const StringOrUndefined, globalObject: *jsc.JSGlobalObject) jsc.JSValue {
3159+
pub fn toJS(this: *StringOrUndefined, globalObject: *jsc.JSGlobalObject) jsc.JSValue {
31603160
return switch (this.*) {
3161-
.string => this.string.toJS(globalObject),
3161+
.string => this.string.transferToJS(globalObject),
31623162
.none => .js_undefined,
31633163
};
31643164
}

0 commit comments

Comments
 (0)