From: Chocobozzz Date: Sat, 24 Jun 2017 08:30:23 +0000 (+0200) Subject: Excluse .js.map when scanning models/ directory X-Git-Tag: v0.0.1-alpha~399 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0c2388548a7432d1a22fbdeb142114383cb5c7e5;p=oweals%2Fpeertube.git Excluse .js.map when scanning models/ directory --- 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 if (err) throw err const directories = files.filter(function (directory) { - // For all models but not utils.js + // Find directories if ( + directory.endsWith('.js.map') || directory === 'index.js' || directory === 'index.ts' || directory === 'utils.js' || directory === 'utils.ts' ) return false