Skip to content

Commit

Permalink
Update google-translate-select.tsx
Browse files Browse the repository at this point in the history
fix react project options is not find
i7eo#78
  • Loading branch information
huazhuangnan authored Nov 3, 2023
1 parent b2d029f commit 34e84e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react/src/google-translate-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,12 @@ export default function GoogleTranslateSelect(props: IGoogleTranslateProps) {
const selectValue = isString(select) ? select : select.value ?? ''
const googleTranslateOriginalSelectEl = document.querySelector(
GOOGLE_TRANSLATE_ORIGINAL_SELECT_CLASSNAME
) as HTMLSelectElement
) as HTMLSelectElement | null
const googleTranslateSelectEl = document.querySelector(`.${ns.b()}`)

if (
!googleTranslateSelectEl ||
!googleTranslateOriginalSelectEl ||
googleTranslateSelectEl.innerHTML.length === 0 ||
googleTranslateOriginalSelectEl.options.length === 0
) {
Expand Down

0 comments on commit 34e84e8

Please sign in to comment.