Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allow a negative indentLevel to throw RangeError: Invalid arra… #6

Merged
merged 1 commit into from
Dec 8, 2015
Merged

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