Skip to content

Commit

Permalink
Merge pull request #4 from litecoin-foundation/bugfix/v0.3.1
Browse files Browse the repository at this point in the history
🐜[Bugfix] Set the current variable outside to global scope
  • Loading branch information
kcw-grunt authored Apr 19, 2023
2 parents 3af8f7f + b1377c0 commit 5ebdb23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions localization.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// localization.js
// This code loads of the text for every text element given a certain language

//Setting the current language hash
var currentLanguage = window.location.hash;

// Define the language reload anchors
var language = {
en: {
Expand Down Expand Up @@ -502,8 +505,6 @@
}
};

var currentLanguage = window.location.hash;

if (window.location.hash) {
//Using switch statement reduces the time from O(n) to O(1)
switch (currentLanguage) {
Expand Down

0 comments on commit 5ebdb23

Please sign in to comment.