diff --git a/jslib b/jslib index 4d57221daa..7b1ffbbcc9 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 4d57221daa405b23766b63c9bd76c9147897e556 +Subproject commit 7b1ffbbcc90af7cb73cb49827d5dc8d16cd5098d diff --git a/src/popup/vault/add-edit.component.ts b/src/popup/vault/add-edit.component.ts index 18da71cd3d..ff7f755c09 100644 --- a/src/popup/vault/add-edit.component.ts +++ b/src/popup/vault/add-edit.component.ts @@ -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) { diff --git a/src/popup/vault/share.component.ts b/src/popup/vault/share.component.ts index e6ad39667c..27ad87ea79 100644 --- a/src/popup/vault/share.component.ts +++ b/src/popup/vault/share.component.ts @@ -38,6 +38,14 @@ export class ShareComponent extends BaseShareComponent { }); } + async submit(): Promise { + const success = await super.submit(); + if (success) { + this.location.back(); + } + return success; + } + cancel() { this.location.back(); }