File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -778,7 +778,7 @@ describe('createFor', () => {
778
778
)
779
779
} )
780
780
781
- test . todo ( 'prepend' , async ( ) => {
781
+ test ( 'prepend' , async ( ) => {
782
782
const arr = ref < number [ ] > ( [ 4 , 5 ] )
783
783
const { host, html } = render ( arr )
784
784
expect ( host . children . length ) . toBe ( 2 )
Original file line number Diff line number Diff line change @@ -196,12 +196,15 @@ export const createFor = (
196
196
endOffset ++
197
197
continue
198
198
}
199
- if ( endOffset !== 0 ) {
200
- anchorFallback = normalizeAnchor ( newBlocks [ currentIndex + 1 ] . nodes )
201
- }
202
199
break
203
200
}
204
201
202
+ if ( endOffset !== 0 ) {
203
+ anchorFallback = normalizeAnchor (
204
+ newBlocks [ newLength - endOffset ] . nodes ,
205
+ )
206
+ }
207
+
205
208
while ( startOffset < sharedBlockCount - endOffset ) {
206
209
const currentItem = getItem ( source , startOffset )
207
210
const currentKey = getKey ( ...currentItem )
You can’t perform that action at this time.
0 commit comments