mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Add conditional for preload functions
This commit is contained in:
parent
4614358163
commit
1fbdfe725c
9 changed files with 13 additions and 10 deletions
|
|
@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
|
|||
import isElectron from 'is-electron';
|
||||
import { FileInput, Text, Button } from '/@/renderer/components';
|
||||
|
||||
const localSettings = window.electron.localSettings;
|
||||
const localSettings = isElectron() ? window.electron.localSettings : null;
|
||||
|
||||
export const MpvRequired = () => {
|
||||
const [mpvPath, setMpvPath] = useState('');
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { AnimatedPage } from '/@/renderer/features/shared';
|
|||
import { AppRoute } from '/@/renderer/router/routes';
|
||||
import { useCurrentServer } from '/@/renderer/store';
|
||||
|
||||
const localSettings = window.electron.localSettings;
|
||||
const localSettings = isElectron() ? window.electron.localSettings : null;
|
||||
|
||||
const ActionRequiredRoute = () => {
|
||||
const currentServer = useCurrentServer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue