Skip to content

Commit b83697e

Browse files
committed
limit model should be .js files
1 parent 201bd27 commit b83697e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/models/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const db: any = {}
4343

4444
fs.readdirSync(__dirname)
4545
.filter(function (file) {
46-
return (file.indexOf('.') !== 0) && (file !== 'index.js')
46+
return (file.indexOf('.') !== 0) && (file !== 'index.js') && file.endsWith('.js')
4747
})
4848
.forEach(function (file) {
4949
const model = sequelize.import(path.join(__dirname, file))

0 commit comments

Comments
 (0)