From 055edc5253e2341b4fa3e9240ad4843adac89c51 Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Tue, 10 Oct 2017 11:37:15 -0400 Subject: [PATCH] Bug 361: check that trim function exists Signed-off-by: Laurence Maultsby --- skyquake/plugins/accounts/src/account/accountSource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skyquake/plugins/accounts/src/account/accountSource.js b/skyquake/plugins/accounts/src/account/accountSource.js index 6ab9a3dcc..854a5eb6f 100644 --- a/skyquake/plugins/accounts/src/account/accountSource.js +++ b/skyquake/plugins/accounts/src/account/accountSource.js @@ -175,7 +175,7 @@ module.exports = function(Alt) { var payloadKeys = Object.keys(payload[payload['account-type']]); var accountData = payload[payload['account-type']]; payloadKeys.map(function(k) { - if (!accountData[k] || accountData[k].trim() == '') { + if (!accountData[k] || (accountData[k].trim && accountData[k].trim() == '')) { delete payload[payload['account-type']][k]; } }); -- 2.25.1