[bugfix]: Remove setting path in attempt to bypass bug (#344)
* Remove setting path in attempt to bypass bug
This commit is contained in:
parent
327fa2b02f
commit
6bd836fad0
1 changed files with 3 additions and 5 deletions
|
@ -68,11 +68,9 @@ export const ApplicationSettings = () => {
|
||||||
|
|
||||||
const fontList = useMemo(() => {
|
const fontList = useMemo(() => {
|
||||||
if (fontSettings.custom) {
|
if (fontSettings.custom) {
|
||||||
const newFile = new File([], fontSettings.custom.split(/(\\|\/)/g).pop()!);
|
return fontSettings.custom.split(/(\\|\/)/g).pop()!;
|
||||||
newFile.path = fontSettings.custom;
|
|
||||||
return newFile;
|
|
||||||
}
|
}
|
||||||
return null;
|
return '';
|
||||||
}, [fontSettings.custom]);
|
}, [fontSettings.custom]);
|
||||||
|
|
||||||
const onFontError = useCallback(
|
const onFontError = useCallback(
|
||||||
|
@ -241,7 +239,7 @@ export const ApplicationSettings = () => {
|
||||||
control: (
|
control: (
|
||||||
<FileInput
|
<FileInput
|
||||||
accept=".ttc,.ttf,.otf,.woff,.woff2"
|
accept=".ttc,.ttf,.otf,.woff,.woff2"
|
||||||
defaultValue={fontList}
|
placeholder={fontList}
|
||||||
w={300}
|
w={300}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
setSettings({
|
setSettings({
|
||||||
|
|
Reference in a new issue