|
@@ -50,7 +50,7 @@ provide(ID_INJECTION_KEY, {
|
|
|
|
|
|
const googleTranslateInit = () => {
|
|
const googleTranslateInit = () => {
|
|
let checkIfGoogleLoaded = setInterval(() => {
|
|
let checkIfGoogleLoaded = setInterval(() => {
|
|
- if (google.translate.TranslateElement != null) {
|
|
|
|
|
|
+ if (google?.translate?.TranslateElement != null) {
|
|
clearInterval(checkIfGoogleLoaded);
|
|
clearInterval(checkIfGoogleLoaded);
|
|
googleTranslateElement('google_translate_element');
|
|
googleTranslateElement('google_translate_element');
|
|
}
|
|
}
|
|
@@ -64,7 +64,7 @@ const googleTranslateElement = (id) => {
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
nextTick(()=>{
|
|
nextTick(()=>{
|
|
- if (google) googleTranslateInit()
|
|
|
|
|
|
+ googleTranslateInit()
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
|