1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

optimizations

This commit is contained in:
Kyle Spearrin
2019-05-10 14:10:40 -04:00
parent 0c3c6857a5
commit db43e247b9
3 changed files with 13 additions and 5 deletions

2
jslib

Submodule jslib updated: 4d57221daa...7b1ffbbcc9

View File

@@ -45,10 +45,10 @@ export class AddEditComponent extends BaseAddEditComponent {
this.folderId = params.folderId;
}
if (params.collectionId) {
const collection = this.writeableCollections.filter((c) => c.id === params.collectionId);
if (collection != null && collection.length > 0) {
this.collectionIds = [collection[0].id];
this.organizationId = collection[0].organizationId;
const collection = this.writeableCollections.find((c) => c.id === params.collectionId);
if (collection != null) {
this.collectionIds = [collection.id];
this.organizationId = collection.organizationId;
}
}
if (params.type) {

View File

@@ -38,6 +38,14 @@ export class ShareComponent extends BaseShareComponent {
});
}
async submit(): Promise<boolean> {
const success = await super.submit();
if (success) {
this.location.back();
}
return success;
}
cancel() {
this.location.back();
}