Dont expect a json response, also be capable to decode
This commit is contained in:
parent
89e43ffea6
commit
f630e9858e
1 changed files with 2 additions and 0 deletions
|
@ -90,6 +90,8 @@ namespace sound {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "audio/speech/mapping.json",
|
url: "audio/speech/mapping.json",
|
||||||
success: response => {
|
success: response => {
|
||||||
|
if(typeof(response) === "string")
|
||||||
|
response = JSON.parse(response);
|
||||||
for(const entry of response)
|
for(const entry of response)
|
||||||
register_sound(entry.key, "speech/" + entry.file);
|
register_sound(entry.key, "speech/" + entry.file);
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Add table
Reference in a new issue