Skip to content

Commit

Permalink
feat(search): prevent search from crashing when no layout (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
mishkolesnikov authored and nnixaa committed Mar 29, 2018
1 parent fd3057d commit 36dc9dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/framework/theme/components/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export class NbSearchComponent implements OnInit, AfterViewInit, OnDestroy {
])
.pipe(
takeWhile(() => this.alive),
filter(([componentRef, data]: [ComponentRef<any>, any]) => componentRef != null),
filter(([componentRef, data]: [ComponentRef<any>, any]) => !this.tag || data.tag === this.tag),
)
.subscribe(([componentRef]: [ComponentRef<any>]) => {
Expand All @@ -252,6 +253,7 @@ export class NbSearchComponent implements OnInit, AfterViewInit, OnDestroy {
])
.pipe(
takeWhile(() => this.alive),
filter(([componentRef, data]: [ComponentRef<any>, any]) => componentRef != null),
filter(([componentRef, data]: [ComponentRef<any>, any]) => !this.tag || data.tag === this.tag),
)
.subscribe(([componentRef]: [ComponentRef<any>]) => {
Expand Down

0 comments on commit 36dc9dd

Please sign in to comment.