1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-12-05 09:14:28 +01:00

address claude feedback

This commit is contained in:
Nick Krantz 2025-12-03 13:24:34 -06:00
parent b1f79f50db
commit 8194916689
No known key found for this signature in database
GPG Key ID: 3B9FBAEED2E06E89

View File

@ -125,11 +125,11 @@ export class VaultSettingsV2Component implements OnInit, OnDestroy {
* the archive page. Otherwise, prompt them to upgrade to premium.
*/
async conditionallyRouteToArchive(event: Event) {
event.preventDefault();
const premiumBadge = this.premiumBadgeComponent();
if (this.userCanArchive() || this.userHasArchivedItems()) {
await this.router.navigate(["/archive"]);
} else if (premiumBadge) {
// The `premiumBadgeComponent` should always be defined here, adding the `if` to satisfy TypeScript.
await premiumBadge.promptForPremium(event);
}
}