Skip to content

Commit

Permalink
fix: return null if payload is null (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
DominusKelvin authored Jul 10, 2023
1 parent c8d9773 commit 36b0b08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/mask-sensitive-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const maskValue = require('../private/mask-value')
* @returns {object} payloadToSendToTreblle
*/
function maskSensitiveValues(payload, fieldsToMask) {
if (payload == null || typeof payload == 'undefined') return null
if (typeof payload !== 'object') return payload

if (Array.isArray(payload)) {
Expand Down

0 comments on commit 36b0b08

Please sign in to comment.