Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
lazar-stamenkovic committed Jul 21, 2023
1 parent af9050b commit ccf002f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ let newActionSubscribers = []
function subscribeToNewActionEvent(reportID, callback) {
newActionSubscribers.push({callback, reportID})
return () => {
newActionSubscribers = newActionSubscribers.filter(s => s.reportID !== reportID);
newActionSubscribers = _.filter(newActionSubscribers, (subscriber) => subscriber.reportID !== reportID)
};
}

Expand All @@ -198,8 +198,8 @@ function subscribeToNewActionEvent(reportID, callback) {
* @param {String} reportActionID
*/
function notifyNewAction(reportID, accountID, reportActionID) {
const actionSubscriber = newActionSubscribers.find(s => s.reportID === reportID)
if (!actionSubscriber) {
const actionSubscriber = _.find(newActionSubscribers, (subscriber) => subscriber.reportID === reportID)
if (!actionSubscriber) {
return
}
const isFromCurrentUser = accountID === currentUserAccountID;
Expand Down

0 comments on commit ccf002f

Please sign in to comment.