Use consistent falsy check for group rank validation
This commit is contained in:
parent
67c2252f43
commit
b53fb16398
|
|
@ -318,7 +318,7 @@ document.getElementById('add-acl-form').addEventListener('submit', async (e) =>
|
||||||
} else if (type === 2 || type === 3) {
|
} else if (type === 2 || type === 3) {
|
||||||
const groupId = document.getElementById('acl-group-id').value.trim();
|
const groupId = document.getElementById('acl-group-id').value.trim();
|
||||||
const rank = document.getElementById('acl-group-rank').value.trim();
|
const rank = document.getElementById('acl-group-rank').value.trim();
|
||||||
if (!groupId || rank === '') return;
|
if (!groupId || !rank) return;
|
||||||
data = `${groupId}:${rank}`;
|
data = `${groupId}:${rank}`;
|
||||||
} else if (type === 4) {
|
} else if (type === 4) {
|
||||||
data = '*';
|
data = '*';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue