Skip to content

Commit

Permalink
fix: getStaticResourcePath in test env
Browse files Browse the repository at this point in the history
  • Loading branch information
devcatalin committed Aug 25, 2021
1 parent a7fd643 commit 444bf97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/redux/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import path from 'path';
*/

export function getStaticResourcePath(resourcePath: string) {
return process.env.NODE_ENV === 'development'
? path.join('resources', resourcePath)
: // @ts-ignore
path.join(process.resourcesPath, 'resources', resourcePath);
return process.env.NODE_ENV === 'production'
? // @ts-ignore
path.join(process.resourcesPath, 'resources', resourcePath)
: path.join('resources', resourcePath);
}

/**
Expand Down

0 comments on commit 444bf97

Please sign in to comment.