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

ERROR TypeError: Cannot read property '0' of undefined #23

Closed s-amasha closed 6 years ago

s-amasha commented 6 years ago

Hi, I was using this library with a project using SystemJS, now the project was moved to be using AngularCLI. This issue appears only with the new CLI project. The error is shown in the chrome console is :

ERROR TypeError: Cannot read property '0' of undefined at webpackJsonp.../../../../vkbeautify/index.js.vkbeautify.xml (index.js:134)

when I click on (index.js:134), I got the error in this line:

// <? xml ... ?> //
if(ar[ix].search(/<\?/) > -1) {
    str += shift[deep]+ar[ix];
} else

My setup is: -Windows 7 x64 -Angular CLI : 1.0.1 -node : 6.10.2 -webpack : 2.5.1

I'm using this simple xml: <?xml version="1.0" encoding="UTF-8"?><note><to>Tove</to><from>Jani</from></note>

Thanks

vkiryukhin commented 6 years ago

Hi s-amasha, as this bug environment-dependent and I can't reproduce it on my computer, I have no idea how I can help you with this problem, sorry.