whoops 5.0.5 → 5.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "whoops",
3
3
  "description": "It makes simple throw qualified errors.",
4
4
  "homepage": "https://github.com/Kikobeats/whoops",
5
- "version": "5.0.5",
5
+ "version": "5.0.7",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "josefrancisco.verdu@gmail.com",
package/src/index.js CHANGED
@@ -17,6 +17,11 @@ function createErrorClass (ErrorClass) {
17
17
  }
18
18
  }
19
19
 
20
+ Object.defineProperty(CustomError, 'name', {
21
+ value: name || ErrorClass.name,
22
+ writable: false
23
+ })
24
+
20
25
  // Function to create an instance, allowing use without `new`
21
26
  function CustomErrorFactory (props) {
22
27
  return new CustomError(props)