Skip to content
New issue

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

addressing-7747;-config.js #11266

Closed
wants to merge 1 commit into from
Closed

addressing-7747;-config.js #11266

wants to merge 1 commit into from

Conversation

pjmattingly
Copy link
Contributor

Addresses: #7747

@pjmattingly
Copy link
Contributor Author

Working on #7747, changes to /lib/classes/config.js

@pjmattingly pjmattingly marked this pull request as ready for review July 22, 2022 05:48
@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #11266 (4075ab4) into main (bb37f4f) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 4075ab4 differs from pull request most recent head e690267. Consider uploading reports for the commit e690267 to get more accurate results

@@            Coverage Diff             @@
##             main   #11266      +/-   ##
==========================================
- Coverage   85.89%   85.89%   -0.01%     
==========================================
  Files         315      315              
  Lines       13247    13246       -1     
==========================================
- Hits        11378    11377       -1     
  Misses       1869     1869              
Impacted Files Coverage Δ
lib/classes/config.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb37f4f...e690267. Read the comment docs.

@@ -12,7 +11,7 @@ class Config {
}

update(config) {
return _.merge(this, config);
return Object.assign(this, config);
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you have a chance to trace if that would be a safe refactor here? Merge does deep copy and assign does only a shallow copy, I think such generic function as this one might be potentially dangerous to rely on just shallow copy

@pgrzesik
Copy link
Contributor

I see you have another PR with bulk of the changes - should this one be closed @pjmattingly?

@pjmattingly
Copy link
Contributor Author

Yes, it's a little embarrassing. I was thinking of making a pull request for each change on #7747; Then I realized that would be a pain in the butt to approve, so I made the bulk PR instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants