From 958596578dc02073ed05cfc99088f58a2d128407 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 28 Jun 2020 23:26:58 +0100 Subject: [PATCH] made sure getting 10k list is synchronous --- public/js/script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/js/script.js b/public/js/script.js index 8bce04134..358f5ed35 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -225,11 +225,12 @@ function initWords() { showBackgroundLoader(); $.ajax({ url: "js/english_10k.json", - async: false - }).then(data => { - hideBackgroundLoader(); + async: false, + success: function (data) { + hideBackgroundLoader(); words['english_10k'] = data; language = words[config.language]; + } }) }