diff options
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; |