mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Fix NumberStepper not working without range slider
This commit is contained in:
parent
0ba8df734c
commit
c18460935f
@ -191,7 +191,12 @@ export class SettingElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let value = parseInt($range.value);
|
let value: number;
|
||||||
|
if ($range) {
|
||||||
|
value = parseInt($range.value);
|
||||||
|
} else {
|
||||||
|
value = parseInt($text.textContent!);
|
||||||
|
}
|
||||||
const btnType = (e.target as HTMLElement).getAttribute('data-type');
|
const btnType = (e.target as HTMLElement).getAttribute('data-type');
|
||||||
if (btnType === 'dec') {
|
if (btnType === 'dec') {
|
||||||
value = Math.max(MIN, value - STEPS);
|
value = Math.max(MIN, value - STEPS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user