From f847a7390fe3683c0723280de18c169715017ccc Mon Sep 17 00:00:00 2001 From: Delisa Mason Date: Wed, 2 Aug 2017 16:37:58 -0700 Subject: [PATCH] Stringify NaN before sending breadcrumbs over the bridge Fixes #107 --- src/Bugsnag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bugsnag.js b/src/Bugsnag.js index 1e2e98ad..52829b39 100644 --- a/src/Bugsnag.js +++ b/src/Bugsnag.js @@ -287,8 +287,8 @@ const typedMap = function(map) { const value = map[key]; - // Checks for both `null` and `undefined`. - if (value == undefined) { + // Checks for `null`, NaN, and `undefined`. + if (value == undefined || isNaN(value)) { output[key] = {type: 'string', value: String(value)} } else if (typeof value === 'object') { output[key] = {type: 'map', value: typedMap(value)};