1 parent ebe6471 commit cca3c68Copy full SHA for cca3c68
1 file changed
hooks/useDevice.ts
@@ -17,8 +17,8 @@ export const useDevice = (): Device => {
17
}
18
19
if (!ctx) {
20
- throw new Error("Missing context in rendering tree");
+ console.warn("Missing context in rendering tree")
21
22
23
- return ctx.device;
+ return ctx?.device || "desktop";
24
};
0 commit comments