Revert "fix(tests): catch non-array parameter"

This reverts commit 595c131398.
This commit is contained in:
SabreCat
2022-08-22 14:17:06 -05:00
parent 631d7111a5
commit cccd8c3b1b

View File

@@ -1447,13 +1447,7 @@ schema.methods.unlinkTags = function unlinkTags (user) {
schema.methods.syncTask = async function groupSyncTask (taskToSync, users, assigningUser) {
const group = this;
const toSave = [];
let usersArray;
if (!Array.isArray(users)) {
usersArray = [users];
} else {
usersArray = users;
}
for (const user of usersArray) {
for (const user of users) {
const assignmentData = {
assignedDate: new Date(),
assignedUsername: user.auth.local.username,