Fix undefined variable on device

This commit is contained in:
Gustavo Maximiliano Cortez 2016-08-17 19:35:07 -03:00
commit 1032aa202f
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF

View file

@ -95,7 +95,10 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
$timeout(function() {
var data = isIOS ? result : result.text;
// Check if the current page is tabs.scan
if (go.is('tabs.scan')) _dataScanned(data);
if (go.is('tabs.scan')) {
_dataScanned(data);
return;
}
$scope.onScan({
data: data
});
@ -187,7 +190,10 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
}
// Check if the current page is tabs.scan
_scanStop();
if (go.is('tabs.scan')) _dataScanned(data);
if (go.is('tabs.scan')) {
_dataScanned(data);
return;
}
$scope.cancel();
$scope.onScan({
data: data