Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Oct 24, 2023

πŸ”— Linked issue

resolves #100

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

When merging two objects, we were not checking if two objects are not pure object and also using Object.assign to merge even classes, which can lead to unwanted behavior such as merging two Date values.

This PR fixes this issue by adding little bit of overhead to the checks using a fork of is-plain-obj

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #111 (06ba4d8) into main (59d0f6a) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #111   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           79        92   +13     
  Branches        24        28    +4     
=========================================
+ Hits            79        92   +13     
Files Coverage Ξ”
src/defu.ts 100.00% <100.00%> (ΓΈ)

@pi0 pi0 merged commit 4111333 into main Oct 24, 2023
@pi0 pi0 deleted the fix/plain-merge branch October 24, 2023 23:05
@pi0 pi0 mentioned this pull request Nov 8, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

merge date bug

2 participants