Skip to content

Commit f658f32

Browse files
lakteknyannyacha
authored andcommitted
fix: expose Supabase namespace to main worker (#472)
1 parent fcfe11c commit f658f32

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

ext/runtime/js/namespaces.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,19 @@ function installEdgeRuntimeNamespace(kind, terminationRequestTokenRid) {
5757
}
5858

5959
/**
60-
* @param {"user" | "main" | "event"} kind
60+
* @param {"user" | "main" | "event"} _kind
6161
*/
62-
function installSupabaseNamespace(kind) {
63-
if (kind === "user") {
64-
const props = {
65-
ai: USER_WORKER_API,
66-
};
62+
function installSupabaseNamespace(_kind) {
63+
const props = {
64+
ai: USER_WORKER_API,
65+
};
6766

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

7775
export { installEdgeRuntimeNamespace, installSupabaseNamespace };

0 commit comments

Comments
 (0)