unless you would want "lighterString" if null or boolean. There should be an assertion making sure that it is a boolean, or documentation as to how null and false are being treated the same here.
Some code uses this.concentrationDescriber.concentrationIncreased !== null and some code uses if ( this.concentrationIncreased ) {. Again it is not clear if here null and boolean are purposefully being linked together.
I think the more explicit you can be here, the better it will be. If ever there is a method here that shouldn't be called if concentrationIncreased is null, I think that should be asserted.
From #171
concentrationIncreased
isboolean
ornull
, so this line seems buggy to me:lighterDarker: this.concentrationIncreased ? darkerString : lighterString
unless you would want "lighterString" if null or boolean. There should be an assertion making sure that it is a boolean, or documentation as to how
null
andfalse
are being treated the same here.this.concentrationDescriber.concentrationIncreased !== null
and some code usesif ( this.concentrationIncreased ) {
. Again it is not clear if here null and boolean are purposefully being linked together.I think the more explicit you can be here, the better it will be. If ever there is a method here that shouldn't be called if concentrationIncreased is
null
, I think that should be asserted.