d3/d3-interpolate

array(undefined, [42]) throws TypeError

mbostock opened this issue · 2 comments

As with #10, the starting value should be treated as an empty array if it’s not an array, rather than potentially throwing an error:

> d3_interpolate.value(undefined, [42])(0.5)
TypeError: Cannot read property 'length' of undefined

This pull request #12 solves the problem with undefined/null case

Fixed by #12.