mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
fix custom path
This commit is contained in:
parent
746ab8c2d9
commit
92ed8e20c9
1 changed files with 3 additions and 1 deletions
|
|
@ -22,6 +22,8 @@ import { FontType } from '/@/shared/types/types';
|
|||
|
||||
const localSettings = isElectron() ? window.api.localSettings : null;
|
||||
const ipc = isElectron() ? window.api.ipc : null;
|
||||
// Electron 32+ removed file.path, use this which is exposed in preload to get real path
|
||||
const webUtils = isElectron() ? window.electron.webUtils : null;
|
||||
|
||||
type Font = {
|
||||
label: string;
|
||||
|
|
@ -254,7 +256,7 @@ export const ApplicationSettings = () => {
|
|||
setSettings({
|
||||
font: {
|
||||
...fontSettings,
|
||||
custom: e?.path ?? null,
|
||||
custom: e ? webUtils?.getPathForFile(e) || null : null,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue