Fix display of app install dialog when no version is provided

This commit is contained in:
Girish Ramakrishnan
2018-01-05 11:58:53 -08:00
parent ff4d3de1b1
commit 28c1a70ae1
2 changed files with 21 additions and 8 deletions
+8 -8
View File
@@ -458,15 +458,15 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.show(result);
});
} else {
var found = $scope.apps.filter(function (app) {
return (app.id === appId) && (version ? version === app.manifest.version : true);
});
AppStore.getAppById(appId, function (error, result) {
if (error) {
$scope.showAppNotFound(appId, null);
console.error(error);
return;
}
if (found.length) {
$scope.appInstall.show(found[0]);
} else {
$scope.showAppNotFound(appId, null);
}
$scope.appInstall.show(result);
});
}
} else {
$scope.appInstall.reset();