Skip to content

Node.js based forum software built for the modern web

fix: broken test caused by errant .pop(), missing await

Julian Lam4ede18ce5f7d
diff --git a/src/flags.js b/src/flags.js
index e2c3085c6f..c6a2a90edd 100644
--- a/src/flags.js
+++ b/src/flags.js
@@ -37,7 +37,7 @@ Flags.init = async function () {
sets.push(prefix + value);
} else if (value.length) {
if (value.length === 1) {
- sets.push(prefix + value.pop());
+ sets.push(prefix + value[0]);
} else {
value.forEach(x => orSets.push(prefix + x));
}
@@ -169,7 +169,7 @@ Flags.getFlagIdsWithFilters = async function ({ filters, uid }) {
Flags.list = async function (data) {
const filters = data.filters || {};
- let flagIds = Flags.getFlagIdsWithFilters({
+ let flagIds = await Flags.getFlagIdsWithFilters({
filters,
uid: data.uid,
});