Skip to content

Commit 2ed278a

Browse files
committed
fixed applyHooks for recursive embedded discriminators
1 parent 95e548e commit 2ed278a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/services/model/applyHooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ function applyHooks(model, schema) {
2828
if (childModel.$appliedHooks) {
2929
continue;
3030
}
31+
applyHooks(childModel, schema.childSchemas[i].schema);
3132
if (childModel.discriminators != null) {
3233
keys = Object.keys(childModel.discriminators);
3334
for (j = 0; j < keys.length; ++j) {
3435
applyHooks(childModel.discriminators[keys[j]],
3536
childModel.discriminators[keys[j]].schema);
3637
}
3738
}
38-
applyHooks(childModel, schema.childSchemas[i].schema);
3939
}
4040

4141
if (!q.length) {

0 commit comments

Comments
 (0)