Skip to content

Fix details-for-tree-entry.js to access fields instead of calling a function - #1326

Merged
cjhoward92 merged 1 commit into
nodegit:masterfrom
rcjsuen:details-te
Dec 20, 2017
Merged

Fix details-for-tree-entry.js to access fields instead of calling a function#1326
cjhoward92 merged 1 commit into
nodegit:masterfrom
rcjsuen:details-te

Conversation

@rcjsuen

@rcjsuen rcjsuen commented Jul 12, 2017

Copy link
Copy Markdown
Member

The example currently calls functions on the IndexEntry object but those are actually fields so they should be accessed as such.

In details-for-tree-entry.js, there are several calls to functions of
an IndexEntry. However, those are actually fields on an object
instead of prototype functions so referring to them as functions will
cause a ReferenceError to be thrown. The fix is to not refer to them
as functions but to simply refer to them as fields instead.

Signed-off-by: Remy Suen <remy.suen@gmail.com>

@cjhoward92 cjhoward92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 Nice!

@cjhoward92
cjhoward92 merged commit 4198db5 into nodegit:master Dec 20, 2017
@rcjsuen
rcjsuen deleted the details-te branch December 20, 2017 21:26
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