From 0c2388548a7432d1a22fbdeb142114383cb5c7e5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 24 Jun 2017 10:30:23 +0200 Subject: [PATCH] Excluse .js.map when scanning models/ directory --- server/initializers/database.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.25.1