File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " sveltekit-sse" ,
3- "version" : " 0.13.13 " ,
3+ "version" : " 0.13.14 " ,
44 "scripts" : {
55 "dev" : " vite dev" ,
66 "build" : " vite build" ,
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ export {}
127127 */
128128
129129/**
130- * @typedef {<T>(or?:import('./types.external').JsonPredicate<T>)=>import('svelte/store').Readable<T> } Jsonifier
130+ * @typedef {<T = null >(or?:import('./types.external').JsonPredicate<T>)=>import('svelte/store').Readable<T extends null ? T|undefined : T> } Jsonifier
131131 */
132132
133133/**
Original file line number Diff line number Diff line change 11<script >
22 import { source } from ' $lib'
33
4- const connection = source (' /issue-65/events' )
5- const stats = connection .select (' message' ).json ()
4+ const connection = source (' /events' )
5+ const stats = connection .select (' message' ).json (function or () {
6+ return { cpu_usage: ' 0.00%' , memory: ' 0.00 MB' , time: 0 }
7+ })
68 </script >
79
810<main >
911 <h2 >Admin dashboard page</h2 >
1012
11- {#if $stats }
12- <span >Cpu usage - {$stats .cpu_usage }</span ><br />
13- <span >Memory - {$stats .memory }</span ><br />
14- <span >Time - {$stats .time }</span ><br />
15- {/if }
13+ <span >Cpu usage - {$stats .cpu_usage }</span ><br />
14+ <span >Memory - {$stats .memory }</span ><br />
15+ <span >Time - {$stats .time }</span ><br />
1616</main >
You can’t perform that action at this time.
0 commit comments