mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 02:52:27 +08:00
refactor(server/utils): simplify getResourceDir
get rid of unnecessary else branch here
This commit is contained in:
parent
6e5e6989ed
commit
a4ce2ddd5e
@ -280,11 +280,8 @@ export function envToBoolean(val: string | undefined) {
|
||||
* @returns the resource dir.
|
||||
*/
|
||||
export function getResourceDir() {
|
||||
if (isElectron && !isDev) {
|
||||
return process.resourcesPath;
|
||||
} else {
|
||||
if (isElectron && !isDev) return process.resourcesPath;
|
||||
return join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
|
Loading…
x
Reference in New Issue
Block a user