Added to wrong branch.

Revert "refactor(accounts-base): use spread operator instead of .push.apply()"

This reverts commit 6adbde798f.
This commit is contained in:
Michael Vogt
2026-03-06 13:58:44 -06:00
parent 6adbde798f
commit 031a656f2b

View File

@@ -904,8 +904,10 @@ export class AccountsServer extends AccountsCommon {
// - forLoggedInUser {Array} Array of fields published to the logged-in user
// - forOtherUsers {Array} Array of fields published to users that aren't logged in
addAutopublishFields(opts) {
this._autopublishFields.loggedInUser.push(...opts.forLoggedInUser);
this._autopublishFields.otherUsers.push(...opts.forOtherUsers);
this._autopublishFields.loggedInUser.push.apply(
this._autopublishFields.loggedInUser, opts.forLoggedInUser);
this._autopublishFields.otherUsers.push.apply(
this._autopublishFields.otherUsers, opts.forOtherUsers);
};
// Replaces the fields to be automatically