flora-errors
Advanced tools
Comparing version 2.0.0-alpha.2 to 2.0.0
'use strict'; | ||
const has = require('has'); | ||
class FloraError extends Error { | ||
@@ -116,3 +114,7 @@ constructor(message, ...args) { | ||
Object.keys(err.info).forEach(key => { | ||
if (!has(error, key) && has(err.info, key)) error[key] = err.info[key]; | ||
if ( | ||
!Object.prototype.hasOwnProperty.call(error, key) && | ||
Object.prototype.hasOwnProperty.call(err.info, key) | ||
) | ||
error[key] = err.info[key]; | ||
}); | ||
@@ -119,0 +121,0 @@ } |
{ | ||
"name": "flora-errors", | ||
"version": "2.0.0-alpha.2", | ||
"version": "2.0.0", | ||
"description": "Error definitions for Flora", | ||
@@ -33,17 +33,14 @@ "main": "index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=10" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.1.7", | ||
"chai": "^4.1.7", | ||
"eslint": "^5.13.0", | ||
"eslint-config-prettier": "^4.0.0", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"mocha": "^5.0.4", | ||
"chai": "^4.2.0", | ||
"eslint": "^6.0.1", | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"mocha": "^6.1.4", | ||
"pre-commit": "^1.2.2", | ||
"prettier": "^1.15.2" | ||
}, | ||
"dependencies": { | ||
"has": "^1.0.1" | ||
"prettier": "^1.18.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
8119
0
117
0
- Removedhas@^1.0.1
- Removedhas@1.0.4(transitive)