Skip to content

Commit 229d00f

Browse files
update and fix getPlatformProxy incorrect changeset (#7841)
1 parent 6b11123 commit 229d00f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.changeset/thick-dots-sit.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"wrangler": patch
2+
"wrangler": minor
33
---
44

55
add support for assets bindings to `getPlatformProxy`
@@ -26,14 +26,12 @@ example:
2626
```js
2727
import { getPlatformProxy } from "wrangler";
2828

29-
const { env } = await getPlatformProxy();
29+
const { env, dispose } = await getPlatformProxy();
3030

3131
if (env.ASSETS) {
32-
const text = await (
33-
await p.env.ASSETS.fetch("http://0.0.0.0/file.txt")
34-
).text();
32+
const text = await (await env.ASSETS.fetch("http://0.0.0.0/file.txt")).text();
3533
console.log(text); // logs the content of file.txt
3634
}
3735

38-
p.dispose();
36+
await dispose();
3937
```

0 commit comments

Comments
 (0)