Skip to content

Commit

Permalink
Fix up this comparison, and log the values all of a sudden causing pr…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgasper committed Jan 10, 2024
1 parent d7cf4d5 commit 58c5441
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
import _ from 'lodash'
import moment from 'moment'
import { logger } from '../../logger/logger';

/**
* Finds the difference between two objects.
Expand Down Expand Up @@ -55,7 +56,8 @@ export const compareEmail = (email1, email2, options = { UNIQUE_GMAIL_VALIDATION
* @returns {Boolean} true if two user handles are same
*/
export const compareHandles = (handle1, handle2) => {
if (handle1 === undefined || handle2 === undefined) {
if (handle1 === undefined || handle2 === undefined || handle1 === null || handle2 === null ) {
logger.info(`Comparing: ${handle1} to ${handle2}`)
return false
}
let h1 = handle1
Expand Down

0 comments on commit 58c5441

Please sign in to comment.