Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
upgrade md5 package. fix dependent code
Browse files Browse the repository at this point in the history
  • Loading branch information
senkevichdv authored and voidxnull committed Nov 2, 2016
1 parent 5f2d35b commit 9cc5829
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"leaflet": "^0.7.7",
"lodash": "~4.16.1",
"lwip": "0.0.9",
"md5": "~2.1.0",
"md5": "~2.2.1",
"messageformat": "^0.3.1",
"mime": "^1.3.4",
"moment": "^2.10.6",
Expand Down
6 changes: 5 additions & 1 deletion src/api/db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ export function initBookshelfFromKnex(knex) {
},
virtuals: {
gravatarHash() {
return md5(this.get('email'));
const email = this.get('email');
if (!email) {
return '';
}
return md5(email);
},
fullName() {
const more = this.get('more');
Expand Down

0 comments on commit 9cc5829

Please sign in to comment.