Skip to content

Commit

Permalink
fix: wrap pickDeep in try/catch due to <stripe/stripe-node#1796>
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed May 24, 2023
1 parent b69ce73 commit 6b6c70c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
"@babel/cli": "^7.21.5",
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.6.1",
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"ava": "^5.2.0",
"babelify": "^10.0.0",
"browserify": "^17.0.0",
"consola": "^3.1.0",
"cross-env": "^7.0.3",
"eslint": "^8.39.0",
"eslint": "^8.41.0",
"eslint-config-xo-lass": "^2.0.1",
"eslint-plugin-compat": "^4.1.4",
"eslint-plugin-node": "^11.1.0",
Expand All @@ -54,12 +54,12 @@
"lint-staged": "^13.2.2",
"lodash": "^4.17.21",
"nyc": "^15.1.0",
"pino": "^8.12.0",
"pino": "^8.14.1",
"remark-cli": "^11.0.0",
"remark-preset-github": "^4.0.4",
"rimraf": "^5.0.0",
"rimraf": "^5.0.1",
"signale": "^1.4.0",
"sinon": "^15.0.4",
"sinon": "^15.1.0",
"tinyify": "3.0.0",
"xo": "^0.54.2"
},
Expand Down
13 changes: 11 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,18 @@ class Axe {
//
// now we call pick-deep using the final array
//
// NOTE: this does not pick symbols nor bigints
// NOTE: this does not pick symbols, bigints, nor streams
// <https://github.com/strikeentco/pick-deep/issues/2>
// <https://github.com/strikeentco/pick-deep/issues/2>
//
meta = pickDeep(meta, dotified);
// NOTE: this is wrapped in try/catch in case similar errors occur
// <https://github.com/stripe/stripe-node/issues/1796>
//
try {
meta = pickDeep(meta, dotified);
} catch (err) {
this.config.logger.error(err);
}

//
// if there were any top-level symbols to be
Expand Down

0 comments on commit 6b6c70c

Please sign in to comment.