mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: broken test caused by errant .pop(), missing await
This commit is contained in:
@@ -37,7 +37,7 @@ Flags.init = async function () {
|
|||||||
sets.push(prefix + value);
|
sets.push(prefix + value);
|
||||||
} else if (value.length) {
|
} else if (value.length) {
|
||||||
if (value.length === 1) {
|
if (value.length === 1) {
|
||||||
sets.push(prefix + value.pop());
|
sets.push(prefix + value[0]);
|
||||||
} else {
|
} else {
|
||||||
value.forEach(x => orSets.push(prefix + x));
|
value.forEach(x => orSets.push(prefix + x));
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ Flags.getFlagIdsWithFilters = async function ({ filters, uid }) {
|
|||||||
|
|
||||||
Flags.list = async function (data) {
|
Flags.list = async function (data) {
|
||||||
const filters = data.filters || {};
|
const filters = data.filters || {};
|
||||||
let flagIds = Flags.getFlagIdsWithFilters({
|
let flagIds = await Flags.getFlagIdsWithFilters({
|
||||||
filters,
|
filters,
|
||||||
uid: data.uid,
|
uid: data.uid,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user