Skip to content

Commit 8989dd3

Browse files
authored
fix: expose Supabase namespace to main worker (#472)
1 parent d2c21c1 commit 8989dd3

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

ext/core/js/namespaces.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,16 @@ function installEdgeRuntimeNamespace(kind, terminationRequestTokenRid) {
5959
* @param {"user" | "main" | "event"} kind
6060
*/
6161
function installSupabaseNamespace(kind) {
62-
if (kind === "user") {
63-
const props = {
64-
ai: USER_WORKER_API
65-
};
62+
const props = {
63+
ai: USER_WORKER_API
64+
};
6665

67-
ObjectDefineProperty(globalThis, "Supabase", {
68-
get() {
69-
return props;
70-
},
71-
configurable: true,
72-
});
73-
}
66+
ObjectDefineProperty(globalThis, "Supabase", {
67+
get() {
68+
return props;
69+
},
70+
configurable: true,
71+
});
7472
}
7573

7674
export {

0 commit comments

Comments
 (0)