Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jemikanegara committed Jun 28, 2024
1 parent 0f8e19c commit a35a4c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ if (isBrowser()) {
}

// console.log("document.readyState", document.readyState)
if (document.readyState == 'complete') {
if (document.readyState == 'interactive' || document.readyState == 'complete') {
// DOM is already loaded, run the code
initTranslation();
} else {
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,8 @@ function setOptions(apiKey, optsArgs) {

async function getTranslations(apiKey, optsArgs = {}) {
try {
console.log("GLOBALSEO initializing...");

if (!optsArgs?.originalLanguage) {
console.error("GLOBALSEO: data-original-language is required, please add it to the script tag")
return;
Expand Down

0 comments on commit a35a4c3

Please sign in to comment.