Skip to content

Commit

Permalink
fix: fix startup with empty database issue #97
Browse files Browse the repository at this point in the history
  • Loading branch information
silveirado committed Dec 21, 2023
1 parent 80c0bf8 commit ea4fe29
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/imports/data/initialData.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ import { db } from '../database';
function metadataPath() {
const dirName = path.resolve('.');

const rootDir = dirName.split('.meteor')[0];

if (rootDir.indexOf('bundle/programs/server') > 0) {
return path.join(rootDir, '../../programs/server/assets/app/metadata');
if (process.env.NODE_ENV === 'production') {
return path.join(dirName, './private/metadata');
}

return path.join(rootDir, 'src/private/metadata');
return path.join(dirName, './src/private/metadata');
}
export async function checkInitialData() {
const currentDateTime = DateTime.now().toJSDate();
Expand Down

0 comments on commit ea4fe29

Please sign in to comment.