We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93ca6a4 commit 0cccef7Copy full SHA for 0cccef7
dist/index.js
@@ -146,7 +146,7 @@ var FetchMock = function () {
146
proxied = void 0;
147
this.proxy.forEach(function (item) {
148
var tmp = (0, _pathToRegexp2.default)(item.path).exec(url);
149
- if (tmp.length > 1) {
+ if (tmp && tmp.length > 1) {
150
matches = tmp;
151
proxied = item;
152
return false;
src/index.js
@@ -98,7 +98,7 @@ class FetchMock {
98
let matches, proxied;
99
this.proxy.forEach(item => {
100
const tmp = pathToRegexp(item.path).exec(url);
101
- if (temp && tmp.length > 1) {
102
103
104
0 commit comments