mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 18:11:23 +01:00
Fix js crash when posting msg also being ratelimited - test if json exists in content
This commit is contained in:
parent
0c544d015b
commit
ddd9a2916a
@ -524,8 +524,10 @@
|
||||
});
|
||||
funct.fail(function(data) {
|
||||
Materialize.toast('Failed to send message.', 10000);
|
||||
for (var i = 0; i < data.responseJSON.illegal_reasons.length; i++) {
|
||||
Materialize.toast(data.responseJSON.illegal_reasons[i], 10000);
|
||||
if (data.responseJSON) {
|
||||
for (var i = 0; i < data.responseJSON.illegal_reasons.length; i++) {
|
||||
Materialize.toast(data.responseJSON.illegal_reasons[i], 10000);
|
||||
}
|
||||
}
|
||||
});
|
||||
funct.catch(function(data) {
|
||||
|
Loading…
Reference in New Issue
Block a user