You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this gives us either null if the prices are not defined, or the corresponding price for each input if the prices are defined.
Then, we switch the ternary operator to use lowerStepperInputValue == null and upperStepperInputValue == null respectively and make the else case equal to lowerStepperInputValue.toString(10) and upperStepperInputValue.toString(10) respectively.
While this may look like more code, it requires fewer calculations and thus I feel is better and more performant.
I see your reasoning, but what if we did the following:
define the following above the input:
this gives us either null if the prices are not defined, or the corresponding price for each input if the prices are defined.
Then, we switch the ternary operator to use
lowerStepperInputValue == null
andupperStepperInputValue == null
respectively and make the else case equal tolowerStepperInputValue.toString(10)
andupperStepperInputValue.toString(10)
respectively.While this may look like more code, it requires fewer calculations and thus I feel is better and more performant.
Originally posted by @IanWoodard in #134 (comment)
The text was updated successfully, but these errors were encountered: