axe-api 0.20.0-rc14 → 0.20.0-rc15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35,7 +35,11 @@ class ModelResolver {
|
|
|
35
35
|
for (const model of modelList.get()) {
|
|
36
36
|
const relationMethods = this.getInstanceMethods(model);
|
|
37
37
|
for (const relationMethod of relationMethods) {
|
|
38
|
-
model.
|
|
38
|
+
const relationFunction = model.instance[relationMethod];
|
|
39
|
+
if (typeof relationFunction !== "function") {
|
|
40
|
+
throw new Error(`Model relation definition should be a function: ${model.name}.${relationMethod}`);
|
|
41
|
+
}
|
|
42
|
+
model.relations.push(relationFunction());
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
45
|
});
|
package/package.json
CHANGED