Slider: set timeoutID to `undefined` on remove

... fixing interference with other timeouts where the same id was assigned to
another timeout that would be deleted erroneously. This was tracked down
because a timeout in the `spotrem` version being developed alongside
this slider module would stop executing code.
master
thyttan 2023-09-26 22:57:17 +02:00
parent eb00e69431
commit 52fe14fb32
1 changed files with 1 additions and 0 deletions

View File

@ -131,6 +131,7 @@ try { // for making it possiblie to run the test app in the following catch stat
o.f.remove = ()=> {
Bangle.removeListener('drag', o.f.dragSlider);
o.v.dragActive = false;
o.v.timeoutID = undefined;
cb("remove", o.v.prevLevel);
};
}