diff options
author | 2021-11-22 10:23:14 -0800 | |
---|---|---|
committer | 2021-11-22 10:23:14 -0800 | |
commit | c06e34c687187a528d0da39eddec71323b56e77a (patch) | |
tree | 7bacae44135162f932eba7a965ec18e18a3b3203 /packages/bun-framework-next/server-polyfills.tsx | |
parent | 7f62169b5e50a6c01d261915a827bfcea98d522d (diff) | |
download | bun-c06e34c687187a528d0da39eddec71323b56e77a.tar.gz bun-c06e34c687187a528d0da39eddec71323b56e77a.tar.zst bun-c06e34c687187a528d0da39eddec71323b56e77a.zip |
misc
Diffstat (limited to 'packages/bun-framework-next/server-polyfills.tsx')
-rw-r--r-- | packages/bun-framework-next/server-polyfills.tsx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/packages/bun-framework-next/server-polyfills.tsx b/packages/bun-framework-next/server-polyfills.tsx index 887621978..57960e4fa 100644 --- a/packages/bun-framework-next/server-polyfills.tsx +++ b/packages/bun-framework-next/server-polyfills.tsx @@ -3,12 +3,9 @@ globalThis.global = globalThis; import { Buffer } from "buffer"; import { URL } from "url-polyfill"; import { TextEncoder, TextDecoder } from "fast-text-encoding"; - -globalThis.Buffer = Buffer; - import * as React from "react"; -var onlyChildPolyfill = React.Children.only; +const onlyChildPolyfill = React.Children.only; React.Children.only = function (children) { if ( @@ -22,7 +19,7 @@ React.Children.only = function (children) { return onlyChildPolyfill(children); }; +globalThis.Buffer = Buffer; globalThis.URL = URL; - globalThis.TextEncoder ||= TextEncoder; globalThis.TextDecoder ||= TextDecoder; |