Update StalkerNotifications.plugin.js

This commit is contained in:
Mirco Wittrien 2019-01-03 10:23:47 +01:00
parent 9defbb2b8e
commit 32c0893a5d
1 changed files with 2 additions and 6 deletions

View File

@ -338,12 +338,8 @@ class StalkerNotifications {
}
else {
require("fs").readFile(url, (error, response) => {
if (error) {
BDFDB.showToast("Could not fetch file. Please make sure the file exists.", {type:"danger"});
}
else {
successSavedAudio(url, `data:audio/mpeg;base64,${response.toString("base64")}`);
}
if (error) BDFDB.showToast("Could not fetch file. Please make sure the file exists.", {type:"danger"});
else successSavedAudio(url, `data:audio/mpeg;base64,${response.toString("base64")}`);
});
}
}