vkiryukhin / vkBeautify

vkBeautify is a small, simple and powerfull javascript plugin to beautify XML, JSON, CSS and SQL text.
http://www.eslinstructor.net/vkbeautify/
Other
316 stars 97 forks source link

BugFix for undefined variable `ix` - Pull Request #21

Open ktalebian opened 7 years ago

ktalebian commented 7 years ago

The function createShiftArr uses variable ix without defining it first. I've had instances where the code crashes when you run under strict mode.

This PR fixes this error.

YiyangLi commented 7 years ago

I got the same error when I tried to use webpack to bundle this package, but shouldn't we add var for all remaining ix?