Skip to content

Commit

Permalink
fix preventInitialTranslation
Browse files Browse the repository at this point in the history
  • Loading branch information
jemikanegara committed Sep 10, 2024
1 parent 3f7c8dc commit a271d13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/translation/startTranslationCycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ const modifyHtmlStrings = require("./modifyHtmlStrings");
const { debounce } = require("../debounce");

async function startTranslationCycle(window, node, apiKey, delay, shouldOptimizeSEO = false) {
if (window.preventInitialTranslation) return;
if (window.preventInitialTranslation) {
window.preventInitialTranslation = false;
return;
};
const lang = window.paramsLang || getGlobalseoActiveLang(window) || await getLanguageFromLocalStorage(window);
const options = getGlobalseoOptions(window);
const originalLang = options?.originalLanguage;
Expand Down

0 comments on commit a271d13

Please sign in to comment.