Skip to content

Commit

Permalink
fix #27: initialize crafter.email correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dmstern committed Nov 26, 2018
1 parent 8196b49 commit 5bfdae5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion types/Crafter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class Crafter extends Searchable {
});
private static allCrafters: Crafter[] = [];

public readonly name?: string;
public readonly name: string;
public readonly email?: string;
public readonly url?: string;

Expand Down Expand Up @@ -64,7 +64,11 @@ export default class Crafter extends Searchable {
}
} else {
this.name = author.name;
this.email = author.email;
this.url = author.url;
}
} else {
this.name = 'Unknown';
}
const alreadyCreatedCrafter = Crafter.allCrafters.find((crafter) =>
crafter.equals(this),
Expand Down

0 comments on commit 5bfdae5

Please sign in to comment.