Commit 974d330
fix(material/slider): Ticks updated wrongly if the max property 0 (#24218)
* fix(material/slider): Ticks updated wrongly if the max property changed to 0
When we get equal min & max value for the slider then we can get division by zero which leads to an improper style value for the background-size (Infinity%). This fix introduces a tiny function that checks if we deal with finite numbers during calculations where potentially division by zero may occur.
Fixes #23913
* fix(material/slider): Check if interval persentage a valid number
Fixes #23913
(cherry picked from commit c1f25bc)1 parent 5d7d6ea commit 974d330
2 files changed
+31
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
453 | 473 | | |
454 | 474 | | |
455 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
| 863 | + | |
863 | 864 | | |
864 | 865 | | |
865 | 866 | | |
866 | 867 | | |
867 | 868 | | |
868 | | - | |
| 869 | + | |
869 | 870 | | |
870 | | - | |
| 871 | + | |
871 | 872 | | |
| 873 | + | |
872 | 874 | | |
873 | 875 | | |
874 | 876 | | |
| |||
883 | 885 | | |
884 | 886 | | |
885 | 887 | | |
886 | | - | |
| 888 | + | |
| 889 | + | |
887 | 890 | | |
888 | 891 | | |
889 | 892 | | |
| |||
954 | 957 | | |
955 | 958 | | |
956 | 959 | | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
957 | 965 | | |
958 | 966 | | |
959 | 967 | | |
| |||
0 commit comments