diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-24 10:30:23 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-24 10:30:23 +0200 |
commit | 0c2388548a7432d1a22fbdeb142114383cb5c7e5 (patch) | |
tree | 8b91506ff1360bb26a8345cf5bd33e383eed52b7 /server | |
parent | 62be8e11e2397f65b773d377ee2bed5f8cf24f09 (diff) | |
download | PeerTube-0c2388548a7432d1a22fbdeb142114383cb5c7e5.tar.gz PeerTube-0c2388548a7432d1a22fbdeb142114383cb5c7e5.tar.zst PeerTube-0c2388548a7432d1a22fbdeb142114383cb5c7e5.zip |
Excluse .js.map when scanning models/ directory
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/database.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts index 47604c6b0..705dec6da 100644 --- a/server/initializers/database.ts +++ b/server/initializers/database.ts | |||
@@ -109,8 +109,9 @@ function getModelFiles (modelDirectory: string, callback: (err: Error, filePaths | |||
109 | if (err) throw err | 109 | if (err) throw err |
110 | 110 | ||
111 | const directories = files.filter(function (directory) { | 111 | const directories = files.filter(function (directory) { |
112 | // For all models but not utils.js | 112 | // Find directories |
113 | if ( | 113 | if ( |
114 | directory.endsWith('.js.map') || | ||
114 | directory === 'index.js' || directory === 'index.ts' || | 115 | directory === 'index.js' || directory === 'index.ts' || |
115 | directory === 'utils.js' || directory === 'utils.ts' | 116 | directory === 'utils.js' || directory === 'utils.ts' |
116 | ) return false | 117 | ) return false |