File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 44 export let data;
55 </script >
66
7- <h1 >Not Hydrated: {data .title }</h1 >
7+ <h1 >Not Hydrated: {data ? .title }</h1 >
88
9- <Doc ref ="posts/first-post " startWith ={data } let:data ={realtimeData }>
10- <h1 >Hydrated: {realtimeData .title }</h1 >
9+ <Doc ref ="posts/test " startWith ={data } let:data ={realtimeData }>
10+ <h1 >Hydrated: {realtimeData ? .title }</h1 >
1111</Doc >
1212
1313<p >
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { doc, getDoc } from 'firebase/firestore';
22import { db } from '../firebase.js' ;
33
44export const load = ( async ( ) => {
5- const ref = doc ( db , 'posts' , 'first-post ' ) ;
5+ const ref = doc ( db , 'posts' , 'test ' ) ;
66 const docSnap = await getDoc ( ref ) ;
77 const data = docSnap . data ( ) ;
88 return {
You can’t perform that action at this time.
0 commit comments