aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/bun.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/api/bun.zig')
-rw-r--r--src/bun.js/api/bun.zig10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/bun.js/api/bun.zig b/src/bun.js/api/bun.zig
index d8506b6b5..d70de3aa9 100644
--- a/src/bun.js/api/bun.zig
+++ b/src/bun.js/api/bun.zig
@@ -2328,15 +2328,7 @@ pub fn getTranspilerConstructor(
_: js.JSStringRef,
_: js.ExceptionRef,
) js.JSValueRef {
- var existing = ctx.ptr().getCachedObject(ZigString.static("BunTranspiler"));
- if (existing.isEmpty()) {
- return ctx.ptr().putCachedObject(
- &ZigString.init("BunTranspiler"),
- JSC.JSValue.fromRef(Transpiler.Constructor.constructor(ctx)),
- ).asObjectRef();
- }
-
- return existing.asObjectRef();
+ return JSC.API.Bun.Transpiler.getConstructor(ctx).asObjectRef();
}
pub fn getFileSystemRouter(