mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Revert "fix(tests): catch non-array parameter"
This reverts commit 595c131398.
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user