Skip to content

Commit

Permalink
fix(angular): setElement checks (#5305)
Browse files Browse the repository at this point in the history
  • Loading branch information
vltansky authored Dec 20, 2021
1 parent 605a727 commit 51c4a49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/angular/src/swiper.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ export class SwiperComponent implements OnInit {
) {}

private _setElement(el: ElementRef, ref: any, update: string, key = 'el') {
if (!ref && !el) return;
if (el && el.nativeElement) {
if (!ref || !el) return;
if (el.nativeElement) {
if (ref[key] === el.nativeElement) {
return;
}
Expand Down

0 comments on commit 51c4a49

Please sign in to comment.