Skip to content

Commit

Permalink
Fixed whenLoaded not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro270707 committed Jun 10, 2024
1 parent 7d714ac commit 6802374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Translate {

whenLoaded(loadFunction) {
if (typeof loadFunction !== 'function') throw new Error('translate.js load function must be a function');
if (!this.file || !this.file.ok) {
if (!this.file) {
this.loadFunctions.push(loadFunction);
} else {
loadFunction();
Expand Down

0 comments on commit 6802374

Please sign in to comment.