Skip to content

Commit

Permalink
fix(utils): 🐛 wrong config search
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharkazaz committed Oct 28, 2021
1 parent 072db89 commit 29afbf9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions libs/transloco-utils/src/lib/transloco-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import { cosmiconfigSync } from 'cosmiconfig';
import * as path from 'path';
import { TranslocoGlobalConfig } from './transloco-utils.types';

export function getGlobalConfig(searchPath?: string): TranslocoGlobalConfig {
if (!searchPath) {
return {};
}

export function getGlobalConfig(
searchPath: string = ''
): TranslocoGlobalConfig {
const explorer = cosmiconfigSync('transloco');
const resolvedPath = path.resolve(process.cwd(), searchPath);
const configSearch = explorer.search(resolvedPath);
Expand Down

0 comments on commit 29afbf9

Please sign in to comment.