Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
updateSwiper() {
const swiperInstance = this.get('swiperInstance');
if (swiperInstance) {
runTask(swiperInstance, 'forceUpdate');
}
}
handleButtonPress(onChange) {
let minInterval = 50;
let decrementBy = 10;
let interval = 200;
let onChangeInterval = () => {
if (interval > minInterval) {
interval -= decrementBy;
}
onChange();
this.buttonPressTaskId = runTask(this, onChangeInterval, interval);
};
this.buttonPressTaskId = runTask(this, onChangeInterval, interval);
},