Fix error usage

This commit is contained in:
Johannes Zellner
2016-08-05 14:00:53 +02:00
parent 26a590b827
commit 1ec5d8c03b
3 changed files with 3 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ function DatabaseError(reason, errorOrMessage) {
this.name = this.constructor.name;
this.reason = reason;
if (typeof errorOrMessage === 'undefined' || errorOrMessage === null) {
if (typeof errorOrMessage === 'undefined') {
this.message = reason;
} else if (typeof errorOrMessage === 'string') {
this.message = errorOrMessage;