Skip to content

Fix symbolic reference handling in getReferences#496

Merged
johnhaley81 merged 1 commit intonodegit:masterfrom
thornbill:fix-symbolic-refs
Mar 20, 2015
Merged

Fix symbolic reference handling in getReferences#496
johnhaley81 merged 1 commit intonodegit:masterfrom
thornbill:fix-symbolic-refs

Conversation

@thornbill
Copy link
Copy Markdown
Contributor

I also updated the example in general.js so that it would return symbolic references as expected.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a typeof check here? That's really only necessary if the variable is possibly undeclared. Simply do !callback or callback == null.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I have updated to just use !callback.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I'm being picky here as someone could pass a falsy value that isn't undefined and that would break your check.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem! You have every right to be picky. 😉

@johnhaley81
Copy link
Copy Markdown
Collaborator

👍 looks good. I'm going to merge this.

johnhaley81 added a commit that referenced this pull request Mar 20, 2015
Fix symbolic reference handling in getReferences
@johnhaley81 johnhaley81 merged commit e1b64ee into nodegit:master Mar 20, 2015
@thornbill thornbill deleted the fix-symbolic-refs branch March 20, 2015 13:45
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.

3 participants