Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

fix(): order and remove property with move operation [PHX-2646] #173

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andreascful
Copy link

Fix the case when an element in an array of objects is moved and another element has a property removed.

INFO: This only fixes the case when move operations are used. The case where remove/add is being used instead is not yet covered and still fails.

Example:

// Before
{
    'hl': [{
            id: 1,
            paramOne: 'bla',
            paramTwo: 'hello'
        }, // 0
        {
            id: 2,
            paramOne: 'ga'
        }, // 1
    ],
}
    
// After  
{
    'hl': [{
            id: 2,
            paramOne: 'ga'
        },
        {
            id: 1,
            paramOne: 'bla'
        }
    ]
}

test/index.js Outdated
]);
});

it.skip('should move elements in the correct order and remove properties of elements without move operation', () => {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the test case for the remove/add variant

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know if it breaks "differently"? Just want to make sure that our down-stream patches still work.

@andreascful andreascful force-pushed the fix/order-and-remove-property branch from 738888e to 4a2185f Compare July 6, 2023 07:33
@andreascful andreascful force-pushed the fix/order-and-remove-property branch from 4a2185f to b7c9411 Compare July 6, 2023 08:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants