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