Skip to content

Commit b7956db

Browse files
committed
Use const where possible.
1 parent 0055e09 commit b7956db

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ApplicationErrorExtension extends Error {
4545
}
4646

4747
toJSON() {
48-
let map = {};
48+
const map = {};
4949
Object.getOwnPropertyNames(this).forEach(key => {
5050
map[key] = this[key];
5151
});
@@ -64,7 +64,7 @@ module.exports.ApplicationError = ApplicationError;
6464
/* eslint-disable no-extend-native */
6565
Error.create = function(errorObject, code) {
6666
if (!(this instanceof Error)) {
67-
let error = new Error().create(errorObject, code);
67+
const error = new Error().create(errorObject, code);
6868
if (typeof Error.captureStackTrace !== 'undefined') {
6969
Error.captureStackTrace(error, Error.create);
7070
}
@@ -81,7 +81,7 @@ Error.prototype.toString = function() {
8181
};
8282
Error.prototype.inspect = Error.prototype.toString;
8383
Error.prototype.toJSON = function() {
84-
let map = {};
84+
const map = {};
8585
Object.getOwnPropertyNames(this).forEach(key => {
8686
map[key] = this[key];
8787
});

0 commit comments

Comments
 (0)