Skip to content

Commit 7a0dfae

Browse files
committed
fix(createRoot): support SYS.* usage
1 parent 1a50b50 commit 7a0dfae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/runtime/src/createRoot.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
isolatedTemplateRegistryMap,
3737
registerIsolatedTemplates,
3838
} from "./internal/IsolatedTemplates.js";
39+
import { hooks } from "./internal/Runtime.js";
3940

4041
export interface CreateRootOptions {
4142
portal?: HTMLElement;
@@ -151,6 +152,9 @@ export function unstable_createRoot(
151152
formStateStoreMap: new Map<string, DataStore<"FORM_STATE">>(),
152153
isolatedRoot,
153154
unsafe_penetrate,
155+
sys: {
156+
...hooks?.auth?.getAuth(),
157+
},
154158
} as Partial<RuntimeContext> as RuntimeContext;
155159

156160
if (url) {

0 commit comments

Comments
 (0)