From: Laurence Maultsby Date: Tue, 10 Oct 2017 15:37:15 +0000 (-0400) Subject: Bug 361: check that trim function exists X-Git-Tag: v3.0.0rc14~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=055edc5253e2341b4fa3e9240ad4843adac89c51;p=osm%2FUI.git Bug 361: check that trim function exists Signed-off-by: Laurence Maultsby --- 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]; } });