You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix asJSON defaults option, make it work for repeated fields.
Fixing two issues in here:
1. When the `defaults` option was enabled, we were using `Object.keys(this)`
which ends up returning an array that includes things like `$root` and
asJSON. Instead we can use the `fields` we already have available.
2. For repeated values we were not setting the empty list default because the
length check would break earlier. We're now passing through when the
defaults option is set as well.
Added a test on this stuff as well.
0 commit comments