Skip to content

Commit ea4fe29

Browse files
committed
fix: fix startup with empty database issue #97
1 parent 80c0bf8 commit ea4fe29

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/imports/data/initialData.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ import { db } from '../database';
1414
function metadataPath() {
1515
const dirName = path.resolve('.');
1616

17-
const rootDir = dirName.split('.meteor')[0];
18-
19-
if (rootDir.indexOf('bundle/programs/server') > 0) {
20-
return path.join(rootDir, '../../programs/server/assets/app/metadata');
17+
if (process.env.NODE_ENV === 'production') {
18+
return path.join(dirName, './private/metadata');
2119
}
2220

23-
return path.join(rootDir, 'src/private/metadata');
21+
return path.join(dirName, './src/private/metadata');
2422
}
2523
export async function checkInitialData() {
2624
const currentDateTime = DateTime.now().toJSDate();

0 commit comments

Comments
 (0)