Skip to content

Commit

Permalink
fix untranslated handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jemikanegara committed May 9, 2024
1 parent a8db954 commit 18dc612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function processTextNodes(textNodes = [], language = "", apiKey = "") {
}

// If the translation is not available, cache the original text
if (window.translationCache?.[window.location.pathname]?.[language]?.[text] == "weploy-untranslated") {
if ((window.translationCache?.[window.location.pathname]?.[language]?.[text] || "").includes("weploy-untranslated")) {
window.translationCache[window.location.pathname][language][text] = text;
}
});
Expand Down

0 comments on commit 18dc612

Please sign in to comment.