We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting an object with spreads results in fields in the wrong order, altering the result.
Given these objects:
const objA = { h: 1080, w: 1600 } const objB = { ...objA, w: 1920 }
sorting objB with the extension results in
objB
const objB = { w: 1920, ...objA }
which is incorrect, as the new fields are no longer overwriting those in the spread object.
const objB = { ...objA, w: 1920 }
objB === { h: 1080, w: 1920 }
objB === { h: 1080, w: 1600 }
macOS Big Sur 11.6 (20G165) VSC 1.62.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Sorting an object with spreads results in fields in the wrong order, altering the result.
Given these objects:
sorting
objB
with the extension results inwhich is incorrect, as the new fields are no longer overwriting those in the spread object.
Expected result
objB === { h: 1080, w: 1920 }
Actual result
objB === { h: 1080, w: 1600 }
Environment
macOS Big Sur 11.6 (20G165)
VSC 1.62.0
The text was updated successfully, but these errors were encountered: