Skip to content

Commit 5daf897

Browse files
sreuterfelixge
authored andcommitted
set this.hash to null by default
1 parent f47e9da commit 5daf897

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/file.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ function File(properties) {
1212
this.path = null;
1313
this.name = null;
1414
this.type = null;
15+
this.hash = null;
1516
this.lastModifiedDate = null;
1617

1718
this._writeStream = null;
1819

19-
if(typeof properties === 'object') {
20-
for (var key in properties) {
21-
this[key] = properties[key];
22-
}
20+
for (var key in properties) {
21+
this[key] = properties[key];
2322
}
2423

2524
if(typeof this.hash === 'string') {

0 commit comments

Comments
 (0)