Skip to content

Commit f1f23b6

Browse files
committed
Fix array type checks
closes #5
1 parent 65ee572 commit f1f23b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/app/controller/transactionPageController.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ define(['serverGateway', 'lodash', 'user', 'transactionPageView', 'userAccountAm
6464

6565
var deposit_address = User.getDepositAddresses();
6666
if (deposit_address){
67-
if( typeof deposit_address == 'array' ) {
67+
if(Array.isArray(deposit_address)) {
6868
deposit_address = deposit_address[0];
6969
}
7070
bitcoin.sendMoney(deposit_address);
@@ -83,7 +83,7 @@ define(['serverGateway', 'lodash', 'user', 'transactionPageView', 'userAccountAm
8383
transactionPageController.prototype.generateDepositAddress = function() {
8484
var deposit_address = User.getDepositAddresses();
8585
if (deposit_address && deposit_address != ''){
86-
if( typeof deposit_address === 'array' ) {
86+
if(Array.isArray(deposit_address)) {
8787
deposit_address = deposit_address[0];
8888
}
8989
bitcoin.sendMoney(deposit_address);
@@ -112,4 +112,4 @@ define(['serverGateway', 'lodash', 'user', 'transactionPageView', 'userAccountAm
112112
}
113113

114114
return transactionPageController;
115-
});
115+
});

0 commit comments

Comments
 (0)