If you look at the babel output for Math.max(...[]) , you get Math.max.apply(Math, []) . If you register this with ES5, you will see that for some reason it gives you -Infinity , because it is the same as calling without an argument.
And indeed, Math.max() gives -Infinity
If you need a reminder: fn.apply( yourThis, [ a, b, c ] ) same as fn( a, b, c )
source share