Skip to content

Conversation

@crazy4groovy
Copy link

@humanwhocodes:

tests passing.

feedback?

@crazy4groovy crazy4groovy force-pushed the default-callback branch 5 times, most recently from 5ab1f9f to 962cdea Compare November 6, 2021 18:01
if (typeof defaultValue === "function") {
// resolve the callback defaultValue
defaultValue = defaultValue(index);
return target[property] = defaultValue;
Copy link
Author

Choose a reason for hiding this comment

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

We could also only assign to target[property] if the resolved defaultValue is an object. There are this.length implications either way. Thoughts?

@crazy4groovy crazy4groovy force-pushed the default-callback branch 2 times, most recently from 9e00017 to befe222 Compare November 9, 2021 15:09
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.

1 participant