mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
fix(slides): undefined error is no longer thrown after destroying and quickly re-creating ion-slides (#23239)
resolves #22289
This commit is contained in:
@ -39,10 +39,12 @@ export class Slides implements ComponentInterface {
|
|||||||
async optionsChanged() {
|
async optionsChanged() {
|
||||||
if (this.swiperReady) {
|
if (this.swiperReady) {
|
||||||
const swiper = await this.getSwiper();
|
const swiper = await this.getSwiper();
|
||||||
|
if (swiper?.params) {
|
||||||
Object.assign(swiper.params, this.options);
|
Object.assign(swiper.params, this.options);
|
||||||
await this.update();
|
await this.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If `true`, show the pagination.
|
* If `true`, show the pagination.
|
||||||
|
Reference in New Issue
Block a user