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 2222<script lang =" ts" >
2323 import { untrack } from " svelte" ;
2424 import type { HTMLAttributes , SvelteHTMLElements } from " svelte/elements" ;
25- import { MediaQuery } from " svelte/reactivity" ;
25+ import { MediaQuery , SvelteMap } from " svelte/reactivity" ;
2626 import { scrollY } from " svelte/reactivity/window" ;
2727 import { browser } from " $app/environment" ;
2828 import { navigating , page } from " $app/state" ;
175175 // We only need to check the first item since we know all items are of the same type
176176 const hasParentId = comments [0 ] && " parent_id" in comments [0 ];
177177
178- // If these are simple items, just sort by date and return
178+ // If these are simple items, sort by date and return
179179 if (! hasParentId ) {
180180 return (comments as IssueDetails [" comments" ]).sort (
181181 (a , b ) => new Date (a .created_at ).getTime () - new Date (b .created_at ).getTime ()
185185 // We know we're dealing with TreeItems at this point
186186 const discussionComments = comments as DiscussionDetails [" comments" ];
187187
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 <
190190 DiscussionDetails [" comments" ][number ][" parent_id" ],
191191 DiscussionDetails [" comments" ]
192192 > ();
You can’t perform that action at this time.
0 commit comments