fix(web): ignore a missing documentElement when marking the home screen revealed
This commit is contained in:
@@ -82,7 +82,9 @@ export function useHomeShellRegistration(params: HomeShellRegistrationParams) {
|
||||
|
||||
useEffect(() => {
|
||||
// The inline dead-screen script stands down only after the app has revealed.
|
||||
if (!hydrated || typeof document === "undefined") return;
|
||||
// Shell tests mount this hook without a documentElement; missing it must not
|
||||
// throw, or the registration effect never gets to run.
|
||||
if (!hydrated || typeof document === "undefined" || !document.documentElement) return;
|
||||
document.documentElement.dataset.hydrated = "1";
|
||||
}, [hydrated]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user