From 64579a071a12230454c8be6caab76a99fb25d4d2 Mon Sep 17 00:00:00 2001 From: Lakshan Perera Date: Mon, 13 Jan 2025 12:42:12 +1100 Subject: [PATCH] fix: expose Supabase namespace to main worker --- ext/core/js/namespaces.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/ext/core/js/namespaces.js b/ext/core/js/namespaces.js index 510d1ac32..e647819da 100644 --- a/ext/core/js/namespaces.js +++ b/ext/core/js/namespaces.js @@ -59,18 +59,16 @@ function installEdgeRuntimeNamespace(kind, terminationRequestTokenRid) { * @param {"user" | "main" | "event"} kind */ function installSupabaseNamespace(kind) { - if (kind === "user") { - const props = { - ai: USER_WORKER_API - }; + const props = { + ai: USER_WORKER_API + }; - ObjectDefineProperty(globalThis, "Supabase", { - get() { - return props; - }, - configurable: true, - }); - } + ObjectDefineProperty(globalThis, "Supabase", { + get() { + return props; + }, + configurable: true, + }); } export {