Sometimes the cryptic semantics of JavaScript are probably the cause. Expression
(0, _utilities.validateNextState)
Evaluates, of course, the link to this function. However, since this subexpression in parentheses indicates a function call that is outside this, without the _utilities object _utilities recognized as the context for the call ( this value). Thus, inside the validateNextState this function will be either undefined or a reference to a global object, depending on the state of the "strict" mode.
I suspect Babel is doing this because in the source code, the call to validateNextState() is executed as if it were a bare function, not an object method. Babylon does not know (possibly) whether this value is relevant for this particular function, but it must make sure that it is safely called.
source share