mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Merge pull request #2944 from jaswilli/error-cleanup
Remove redundant function declaration
This commit is contained in:
commit
df8ba5f439
1 changed files with 1 additions and 5 deletions
|
@ -1,10 +1,6 @@
|
||||||
// # Validation Error
|
// # Validation Error
|
||||||
// Custom error class with status code and type prefilled.
|
// Custom error class with status code and type prefilled.
|
||||||
|
|
||||||
function ValidationError(message) {
|
|
||||||
return new ValidationError(message, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
function ValidationError(message, offendingProperty) {
|
function ValidationError(message, offendingProperty) {
|
||||||
this.message = message;
|
this.message = message;
|
||||||
this.stack = new Error().stack;
|
this.stack = new Error().stack;
|
||||||
|
@ -19,4 +15,4 @@ ValidationError.prototype = Object.create(Error.prototype);
|
||||||
ValidationError.prototype.name = "ValidationError";
|
ValidationError.prototype.name = "ValidationError";
|
||||||
|
|
||||||
|
|
||||||
module.exports = ValidationError;
|
module.exports = ValidationError;
|
||||||
|
|
Loading…
Add table
Reference in a new issue