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

empty description results in javascript error #163

Closed
tomtomsen opened this issue Nov 13, 2019 · 2 comments · Fixed by #164
Closed

empty description results in javascript error #163

tomtomsen opened this issue Nov 13, 2019 · 2 comments · Fixed by #164
Labels
bug 🪲 Something isn't working

Comments

@tomtomsen
Copy link
Contributor

Description

If there is a empty description in package.json, npm-package-json-lint fails with the error Cannot read property 'toUpperCase' of undefined.

Environment:

  • npm-package-json-lint: 4.1.0
  • npm: 6.13.0
  • node: 10.16.3

My package.json:

{
   ...
   description: "",
   ...
}

Output:

# ./node_modules/.bin/npmPkgJsonLint -c .npmpackagejsonlintrc.json .     
Cannot read property 'toUpperCase' of undefined

Expected:

List of all actual errors

@tclindner
Copy link
Owner

Hey @tomtomsen! Nice catch! I’ll get a release cut tomorrow with your fix. Thank you for opening a PR 🙌

@tclindner tclindner added the bug 🪲 Something isn't working label Nov 14, 2019
tclindner pushed a commit that referenced this issue Nov 15, 2019
* Fix test description to match, what actually is happening

* Allow empty description

Fixed issue which results in a javascript error if description was empty.

Fixes #163
@tclindner
Copy link
Owner

Hey @tomtomsen, v4.1.1 has been released. Thank you again for fixing this issue 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants