Skip to content

Commit

Permalink
Use the new forEach in Hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
StorytellerCZ committed Feb 3, 2024
1 parent 26951c3 commit 3a46afa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions link_accounts_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Accounts.LinkUserFromExternalService = async function (

// Before link hook
let shouldStop = false
Accounts._beforeLink.each((callback) => {
Accounts._beforeLink.forEach((callback) => {
// eslint-disable-next-line n/no-callback-literal
const result = callback({
type: serviceName,
Expand All @@ -168,7 +168,7 @@ Accounts.LinkUserFromExternalService = async function (
}

// On link hook
Accounts._onLink.each((callback) => {
Accounts._onLink.forEach((callback) => {
// eslint-disable-next-line n/no-callback-literal
callback({
type: serviceName,
Expand Down Expand Up @@ -211,7 +211,7 @@ Accounts.unlinkService = async function (userId, serviceName, cb) {
}
)
// On unlink hook
Accounts._onUnlink.each((callback) => {
Accounts._onUnlink.forEach((callback) => {
// eslint-disable-next-line n/no-callback-literal
callback({ type: serviceName, user: Meteor.user() })
return true
Expand Down

0 comments on commit 3a46afa

Please sign in to comment.