File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/routes/[pid=pid]/[org]/[repo]/[id=number] Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 22
22
<script lang =" ts" >
23
23
import { untrack } from " svelte" ;
24
24
import type { HTMLAttributes , SvelteHTMLElements } from " svelte/elements" ;
25
- import { MediaQuery } from " svelte/reactivity" ;
25
+ import { MediaQuery , SvelteMap } from " svelte/reactivity" ;
26
26
import { scrollY } from " svelte/reactivity/window" ;
27
27
import { browser } from " $app/environment" ;
28
28
import { navigating , page } from " $app/state" ;
175
175
// We only need to check the first item since we know all items are of the same type
176
176
const hasParentId = comments [0 ] && " parent_id" in comments [0 ];
177
177
178
- // If these are simple items, just sort by date and return
178
+ // If these are simple items, sort by date and return
179
179
if (! hasParentId ) {
180
180
return (comments as IssueDetails [" comments" ]).sort (
181
181
(a , b ) => new Date (a .created_at ).getTime () - new Date (b .created_at ).getTime ()
185
185
// We know we're dealing with TreeItems at this point
186
186
const discussionComments = comments as DiscussionDetails [" comments" ];
187
187
188
- // Create a map to store children by their parent_id for quick lookup
189
- const childrenMap = new Map <
188
+ // Create a map to store children by their parent_id for quick lookups
189
+ const childrenMap = new SvelteMap <
190
190
DiscussionDetails [" comments" ][number ][" parent_id" ],
191
191
DiscussionDetails [" comments" ]
192
192
> ();
You can’t perform that action at this time.
0 commit comments