Skip to content

Commit 9041b51

Browse files
committed
fix(plugin-timeout): override request with new object
1 parent a1966ba commit 9041b51

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.changeset/rude-ties-kick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@plantae/plugin-timeout": patch
3+
---
4+
5+
fix(plugin-timeout): override request with new object

packages/plugin-timeout/src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ export default function timeoutPlugin(timeout: number): Plugin {
1111
controller.abort();
1212
}, timeout);
1313

14-
return {
15-
...req,
14+
return new Request(req, {
1615
signal: controller.signal,
17-
};
16+
});
1817
},
1918
},
2019
};

0 commit comments

Comments
 (0)