Skip to content

Commit

Permalink
fix(document): allow accessing document values from function `default…
Browse files Browse the repository at this point in the history
…` on array

Fix #9351
  • Loading branch information
vkarpov15 committed Aug 24, 2020
1 parent ae5d739 commit 0b46829
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/schema/array.js
Expand Up @@ -116,7 +116,7 @@ function SchemaArray(key, cast, options, schemaOptions) {
// Leave it up to `cast()` to convert the array
return arr;
};
defaultFn.$runBeforeSetters = true;
defaultFn.$runBeforeSetters = !fn;
this.default(defaultFn);
}
}
Expand Down

0 comments on commit 0b46829

Please sign in to comment.