Dont expect a json response, also be capable to decode

This commit is contained in:
WolverinDEV 2018-11-04 15:12:38 +01:00
parent 89e43ffea6
commit f630e9858e

View file

@ -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();