File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ export function mark_module_end() {
75
75
const end = get_stack ( ) ?. [ 2 ] ;
76
76
77
77
if ( end ) {
78
- // @ts -expect-error
79
- boundaries [ end . file ] . at ( - 1 ) . end = end ;
78
+ const boundaries_file = boundaries [ end . file ] ;
79
+ boundaries_file [ boundaries_file . length - 1 ] . end = end ;
80
80
}
81
81
}
82
82
Original file line number Diff line number Diff line change @@ -393,7 +393,8 @@ function reconcile_indexed_array(
393
393
b_blocks [ index ] = block ;
394
394
395
395
hydrating_node = /** @type {import('../../types.js').TemplateNode } */ (
396
- /** @type {Node } */ ( /** @type {Node } */ ( fragment . at ( - 1 ) ) . nextSibling ) . nextSibling
396
+ /** @type {Node } */ ( /** @type {Node } */ ( fragment [ fragment . length - 1 ] ) . nextSibling )
397
+ . nextSibling
397
398
) ;
398
399
}
399
400
@@ -517,7 +518,8 @@ function reconcile_tracked_array(
517
518
// Get the <!--ssr:..--> tag of the next item in the list
518
519
// The fragment array can be empty if each block has no content
519
520
hydrating_node = /** @type {import('../../types.js').TemplateNode } */ (
520
- /** @type {Node } */ ( ( fragment . at ( - 1 ) || hydrating_node ) . nextSibling ) . nextSibling
521
+ /** @type {Node } */ ( ( fragment [ fragment . length - 1 ] || hydrating_node ) . nextSibling )
522
+ . nextSibling
521
523
) ;
522
524
}
523
525
Original file line number Diff line number Diff line change @@ -274,10 +274,10 @@ function capture_fragment_from_node(node) {
274
274
if (
275
275
node . nodeType === 8 &&
276
276
/** @type {Comment } */ ( node ) . data . startsWith ( 'ssr:' ) &&
277
- current_hydration_fragment . at ( - 1 ) !== node
277
+ current_hydration_fragment [ current_hydration_fragment . length - 1 ] !== node
278
278
) {
279
279
const fragment = /** @type {Array<Element | Text | Comment> } */ ( get_hydration_fragment ( node ) ) ;
280
- const last_child = fragment . at ( - 1 ) || node ;
280
+ const last_child = fragment [ fragment . length - 1 ] || node ;
281
281
const target = /** @type {Node } */ ( last_child . nextSibling ) ;
282
282
// @ts -ignore
283
283
target . $$fragment = fragment ;
You can’t perform that action at this time.
0 commit comments