diff --git a/packages/components/src/components/post-breadcrumb-item/post-breadcrumb-item.tsx b/packages/components/src/components/post-breadcrumb-item/post-breadcrumb-item.tsx index 29380dd7f1..41edd1db45 100644 --- a/packages/components/src/components/post-breadcrumb-item/post-breadcrumb-item.tsx +++ b/packages/components/src/components/post-breadcrumb-item/post-breadcrumb-item.tsx @@ -18,12 +18,13 @@ export class PostBreadcrumbItem { */ @Prop() url?: string | URL; - private validUrl?: string; + private validUrl?: string = ''; @Watch('url') validateUrl() { try { this.validUrl = this.constructUrl(this.url); + return; } catch (error) { this.validUrl = undefined; } @@ -57,4 +58,4 @@ export class PostBreadcrumbItem { ); } -} \ No newline at end of file +}