From f630e9858e7ca21e6621e9d2de674dc408d203cf Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 4 Nov 2018 15:12:38 +0100 Subject: [PATCH] Dont expect a json response, also be capable to decode --- shared/js/sound/Sounds.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared/js/sound/Sounds.ts b/shared/js/sound/Sounds.ts index de41108c..c50580b2 100644 --- a/shared/js/sound/Sounds.ts +++ b/shared/js/sound/Sounds.ts @@ -90,6 +90,8 @@ namespace sound { $.ajax({ url: "audio/speech/mapping.json", success: response => { + if(typeof(response) === "string") + response = JSON.parse(response); for(const entry of response) register_sound(entry.key, "speech/" + entry.file); resolve();