Skip to content

Conversation

@lathonez
Copy link
Contributor

@lathonez lathonez commented Dec 8, 2015

Just realised I forgot to PR this. It's an upstream bug in jsonlint, see zaach/jsonlint#73

Simplest replication I can find:

{
        "key": "value"
}
}
}

Which gives Uncaught TypeError: Cannot read property 'top' of undefined from main.js:1186. I've not checked other browsers but as it's a bug in jsonlint itself I'm sure it will be present.

My fix is to force the count value to zero inside jsl.format.repeat if it happens to be negative.

finom added a commit that referenced this pull request Dec 8, 2015
Do not allow a negative indentLevel to throw RangeError: Invalid arra…
@finom finom merged commit 7c45a8a into circlecell:master Dec 8, 2015
@finom
Copy link
Contributor

finom commented Dec 8, 2015

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants