fix: type error

This commit is contained in:
tiddlygit-test 2021-04-29 22:39:04 +08:00
parent eae68a734b
commit 3cb9668880
2 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ const InfoContainer = styled.div`
padding: 0 12px;
`;
export default function FindInPage(): JSX.Element | undefined {
export default function FindInPage(): JSX.Element | null {
const [open, openSetter] = useState(false);
const [text, textSetter] = useState('');
const [activeMatch, activeMatchSetter] = useState(0);
@ -50,7 +50,7 @@ export default function FindInPage(): JSX.Element | undefined {
};
}, [handleOpenFindInPage, updateFindInPageMatches]);
if (!open) {
return;
return null;
}
return (
<Root>

View file

@ -13,7 +13,7 @@ export const remoteMethods = {
await service.menu.buildContextMenuAndPopup(ipcSafeMenus, parameters, windowName);
return unregister;
},
closeCurrentWindow: async (): Promise<() => void> => {
closeCurrentWindow: async (): Promise<void> => {
await service.window.close(windowName);
},
/** call NodeJS.path */