1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-08-31 00:01:03 +02:00

remove empty uri on add

This commit is contained in:
Kyle Spearrin 2018-04-16 15:17:50 -04:00
parent c0f38216ef
commit db39d58ea8

View File

@ -36,6 +36,11 @@
$scope.savePromise = null;
$scope.save = function () {
if ($scope.cipher.type === constants.cipherType.login && $scope.cipher.login.uris.length === 1 &&
($scope.cipher.login.uris[0].uri == null || $scope.cipher.login.uris[0].uri === '')) {
$scope.cipher.login.uris = null;
}
var cipher = cipherService.encryptCipher($scope.cipher);
$scope.savePromise = apiService.ciphers.post(cipher, function (cipherResponse) {
$analytics.eventTrack('Created Cipher');