Fix settings not saving if overflow category not saving
This commit is contained in:
parent
702e9be96d
commit
698d9d2965
@ -151,6 +151,11 @@
|
|||||||
function showValidations(data) {
|
function showValidations(data) {
|
||||||
let success = true;
|
let success = true;
|
||||||
|
|
||||||
|
if (data.error !== null) {
|
||||||
|
success = false;
|
||||||
|
notify("Warning", data.error);
|
||||||
|
}
|
||||||
|
|
||||||
if (!data.prefix) {
|
if (!data.prefix) {
|
||||||
success = false;
|
success = false;
|
||||||
notify("Warning", "Your prefix has not been saved.\nPrefixes must be between 1 - 8 characters in length.")
|
notify("Warning", "Your prefix has not been saved.\nPrefixes must be between 1 - 8 characters in length.")
|
||||||
@ -214,6 +219,10 @@
|
|||||||
if (data.overflow_category_id === null) {
|
if (data.overflow_category_id === null) {
|
||||||
data.overflow_category_id = "-2";
|
data.overflow_category_id = "-2";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!channels.some((c) => c.id === data.overflow_category_id)) {
|
||||||
|
data.overflow_category_id = "-2";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user