Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cf24e9a

Browse filesBrowse files
committed
Updated commit "constructor"
1 parent dd440cc commit cf24e9a
Copy full SHA for cf24e9a

File tree

Expand file treeCollapse file tree

1 file changed

+5
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-6
lines changed
Open diff view settings
Collapse file

‎lib/commit.js‎

Copy file name to clipboardExpand all lines: lib/commit.js
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@ function applyDetails(details, context) {
2020
/**
2121
* Convenience commit constructor.
2222
*
23-
* @param {RawCommit} obj
23+
* @param {RawCommit|Null} rawCommit
2424
* @return {Commit}
2525
*/
26-
var _Commit = function(obj) {
26+
var _Commit = function(rawCommit) {
2727
var self = {};
2828

29-
if(obj instanceof git.raw.Commit) {
30-
self.commit = obj;
31-
}
32-
else {
29+
if(rawCommit && rawCommit instanceof git.raw.Commit) {
30+
self.commit = rawCommit;
31+
} else {
3332
self.commit = new git.raw.Commit();
3433
}
3534

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.