-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Optimize _.defaults so that it doesn't access property values it doesn't need to #2983
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
Labels
Comments
Yep, that's doable. Thanks! |
Wow, that was fast! Thank you! |
@jdalton Do you know when the next release will be? |
It'll be in our v5 release, so expect a delay. |
jdalton
added a commit
that referenced
this issue
Feb 3, 2018
jdalton
added a commit
that referenced
this issue
Feb 3, 2018
mAiNiNfEcTiOn
pushed a commit
to mAiNiNfEcTiOn/lodash
that referenced
this issue
Feb 7, 2018
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Suppose I have some config object that must be initialized. Well, at least some of the properties must be initialized -- some do not.
I would like to be able to use the
initializableConfig
as a default at all times (even before it's initialized). I should be fine to do so as long as I override the properties that must be initialized.Since
config
definesa
andb
, I see no reason why those properties need to be accessed on theinitializableConfig
. Currently they are and an error is being thrown.Couldn't
_.defaults
be optimized to avoid this error?The text was updated successfully, but these errors were encountered: