fix: slider crash on some platforms

This commit is contained in:
Felix Roos 2023-10-04 09:42:10 +02:00
parent 28966739f6
commit 020e85906d

View File

@ -91,8 +91,10 @@ export const sliderPlugin = ViewPlugin.fromClass(
while (iterator.value) {
// when the widgets are moved, we need to tell the dom node the current position
// this is important because the updateSliderValue function has to work with the dom node
iterator.value.widget.slider.from = iterator.from;
iterator.value.widget.slider.to = iterator.to;
if (iterator.value?.widget?.slider) {
iterator.value.widget.slider.from = iterator.from;
iterator.value.widget.slider.to = iterator.to;
}
iterator.next();
}
}