Skip to content

Commit

Permalink
🐛 Ignore when the .perf promise throws
Browse files Browse the repository at this point in the history
Should solve #131
  • Loading branch information
elbywan committed May 21, 2022
1 parent 9d5758e commit 33407ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const resolver = (wretcher: Wretcher) => {
* Warning: Still experimental on browsers and node.js
*/
perfs: cb => {
fetchRequest.then(res => perfs.observe(res.url, cb))
fetchRequest.then(res => perfs.observe(res.url, cb)).catch(() => {/* swallow */ })
return responseChain
},
/**
Expand Down
2 changes: 1 addition & 1 deletion test/mock.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require("fs")
const path = require("path")
const restify = require("restify")
const corsMiddleware = require("restify-cors-middleware")
const corsMiddleware = require("restify-cors-middleware2")

const cors = corsMiddleware({
origins: ["*"],
Expand Down

0 comments on commit 33407ea

Please sign in to comment.