Skip to content

Commit e46f265

Browse files
mingchunoFilipe
and
Filipe
authored
fix: Add check if model dependency is string (#3)
Co-authored-by: Filipe <filipe.pacheco@mercury.co.nz>
1 parent 0ee4cbf commit e46f265

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/models.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ module.exports = {
6363

6464
addModelDependencies: function addModelDependencies(models, resource) {
6565
Object.keys(models).forEach(contentType => {
66-
resource.DependsOn.add(`${models[contentType]}Model`);
66+
if (typeof models[contentType] === 'string') {
67+
resource.DependsOn.add(`${models[contentType]}Model`);
68+
}
6769
});
6870
},
6971

0 commit comments

Comments
 (0)