Commit 9d023ba7b558e9d913de49de25ac73d637094129
1 parent
4c1787cd83
Exists in
master
update balance hanya jika balance adalah string
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
partner-simplepay.js
... | ... | @@ -175,7 +175,7 @@ function _responseBodyHandler(responseBody, task) { |
175 | 175 | const diag = _getPropertyFromObjectSafe(response.data, 'diag'); |
176 | 176 | let balance = _getPropertyFromObjectSafe(response.data, 'balance'); |
177 | 177 | |
178 | - if (balance && aaa.updateBalance) { | |
178 | + if ((typeof balance === 'string') && balance && aaa.updateBalance) { | |
179 | 179 | balance = balance.replace(/\D/g, ''); |
180 | 180 | if (balance) { |
181 | 181 | aaa.updateBalance(balance); |