Skip to content

Commit 33407ea

Browse files
committed
🐛 Ignore when the .perf promise throws
Should solve #131
1 parent 9d5758e commit 33407ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/resolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const resolver = (wretcher: Wretcher) => {
140140
* Warning: Still experimental on browsers and node.js
141141
*/
142142
perfs: cb => {
143-
fetchRequest.then(res => perfs.observe(res.url, cb))
143+
fetchRequest.then(res => perfs.observe(res.url, cb)).catch(() => {/* swallow */ })
144144
return responseChain
145145
},
146146
/**

test/mock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const fs = require("fs")
22
const path = require("path")
33
const restify = require("restify")
4-
const corsMiddleware = require("restify-cors-middleware")
4+
const corsMiddleware = require("restify-cors-middleware2")
55

66
const cors = corsMiddleware({
77
origins: ["*"],

0 commit comments

Comments
 (0)