This repository was archived by the owner on Jul 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2270,8 +2270,8 @@ function run() {
22702270 yield ensureCard ( automationNoteCard , 0 , targetColumn ) ;
22712271 // delete all cards in target column that do not exist in the source column,
22722272 // except for the automation note
2273- // start at index 1 to account for the automation note card
2274- for ( let index = 1 ; index < targetColumn . cards . nodes . length ; index ++ ) {
2273+ // don't iterate over index 0, to account for the automation note card
2274+ for ( let index = targetColumn . cards . nodes . length - 1 ; index >= 1 ; index -- ) {
22752275 const targetCard = targetColumn . cards . nodes [ index ] ;
22762276 const [ sourceCard ] = findCard ( targetCard , sourceColumn ) ;
22772277 if ( ! sourceCard ) {
Original file line number Diff line number Diff line change @@ -125,8 +125,8 @@ async function run(): Promise<void> {
125125
126126 // delete all cards in target column that do not exist in the source column,
127127 // except for the automation note
128- // start at index 1 to account for the automation note card
129- for ( let index = 1 ; index < targetColumn . cards . nodes . length ; index ++ ) {
128+ // don't iterate over index 0, to account for the automation note card
129+ for ( let index = targetColumn . cards . nodes . length - 1 ; index >= 1 ; index -- ) {
130130 const targetCard = targetColumn . cards . nodes [ index ]
131131 const [ sourceCard ] = findCard ( targetCard , sourceColumn )
132132
You can’t perform that action at this time.
0 commit comments