Skip to content

fix an error when there is a package.json but no repo url#10

Open
fharper wants to merge 1 commit into
WeAllJS:latestfrom
fharper:latest
Open

fix an error when there is a package.json but no repo url#10
fharper wants to merge 1 commit into
WeAllJS:latestfrom
fharper:latest

Conversation

@fharper

@fharper fharper commented Dec 11, 2018

Copy link
Copy Markdown

No description provided.

@waldyrious

Copy link
Copy Markdown

I might be missing something, but how exactly does the new code behave differently than the current one?

@fharper

fharper commented Dec 12, 2018

Copy link
Copy Markdown
Author

The initial code is throwing a TypeError: Cannot read property 'url' of undefined if repo doesn't exist as it's accessing url. My small change is checking if repo exist before verifying if url also exists and use it if it's the case.

@waldyrious

Copy link
Copy Markdown

Ah, right, right. That's what I get for reading code late at night! 😅 Thanks for clarifying.

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