fix undefined error when lookup (#613)

This commit is contained in:
an-lee
2024-05-16 20:45:04 +08:00
committed by GitHub
parent bcb4be1371
commit df68540fb1

View File

@@ -114,7 +114,7 @@ export const AiLookupResult = (props: {
const handleLookup = async (options?: { force: boolean }) => {
if (lookingUp) return;
if (!word) return;
const { force = false } = options;
const { force = false } = options || {};
setLookingUp(true);
lookupWord({