aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/api/bun.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bun.js/api/bun.zig b/src/bun.js/api/bun.zig
index 0c22a5d9b..ed3ad3710 100644
--- a/src/bun.js/api/bun.zig
+++ b/src/bun.js/api/bun.zig
@@ -1365,6 +1365,7 @@ pub const Crypto = struct {
}
pub fn update(this: *@This(), globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSC.JSValue {
+ const thisValue = callframe.this();
const input = callframe.argument(0);
const buffer = JSC.Node.SliceOrBuffer.fromJS(globalThis.ptr(), globalThis.bunVM().allocator, input) orelse {
globalThis.throwInvalidArguments("expected string or buffer", .{});
@@ -1372,7 +1373,7 @@ pub const Crypto = struct {
};
defer buffer.deinit();
this.hashing.update(buffer.slice());
- return input;
+ return thisValue;
}
pub fn digest_(