Skip to content

Commit

Permalink
fix(angular): setElement call updateInitSwiper bug (#5296)
Browse files Browse the repository at this point in the history
* fix(angular): setElement call updateInitSwiper bug
  • Loading branch information
vltansky authored Dec 16, 2021
1 parent 090b42a commit 99be5ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/angular/src/swiper.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ export class SwiperComponent implements OnInit {
) {}

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

0 comments on commit 99be5ea

Please sign in to comment.