fixed infinite loop 0 length array

sumh <42424861@qq.com>
fixed loop bug in scale/polylinear.js

sumh <42424861@qq.com>