Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cassiopee
jalhyd
Commits
0fad80c0
Commit
0fad80c0
authored
Nov 18, 2019
by
Mathias Chouet
🍝
Browse files
getInferredValuesList() : protection against null min/max
parent
05990896
Changes
1
Show whitespace changes
Inline
Side-by-side
src/param/param-values.ts
View file @
0fad80c0
...
...
@@ -117,7 +117,11 @@ export class ParamValues implements IterableValues {
public
getInferredValuesList
(
reverse
:
boolean
=
false
,
extendTo
?:
number
,
addLastStep
:
boolean
=
false
)
{
if
([
ParamValueMode
.
MINMAX
,
ParamValueMode
.
LISTE
].
includes
(
this
.
valueMode
))
{
// protection against infinite loops
if
(
this
.
step
!==
undefined
&&
this
.
step
>
0
)
{
if
(
this
.
step
!==
undefined
&&
this
.
step
>
0
&&
this
.
min
!==
undefined
&&
this
.
min
!==
null
&&
this
.
max
!==
undefined
&&
this
.
max
!==
null
)
{
const
it
=
this
.
initValuesIterator
(
reverse
,
extendTo
,
addLastStep
);
const
values
:
number
[]
=
[];
for
(
const
v
of
it
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment