diff options
author | 2022-02-24 00:16:45 -0800 | |
---|---|---|
committer | 2022-02-24 00:16:45 -0800 | |
commit | 5f50de2b390ef1ddfe2e108d285024ef45d4c421 (patch) | |
tree | fc357dab0f0640345e0c7d60b6bc422732daa8d5 /packages/bun-framework-next/server-polyfills.tsx | |
parent | b37cb738021fa87fffa2bee50329c1ae55d79f4d (diff) | |
download | bun-5f50de2b390ef1ddfe2e108d285024ef45d4c421.tar.gz bun-5f50de2b390ef1ddfe2e108d285024ef45d4c421.tar.zst bun-5f50de2b390ef1ddfe2e108d285024ef45d4c421.zip |
[bun-framework-next] Remove TextEncoder & TextDecoder polyfills
Diffstat (limited to 'packages/bun-framework-next/server-polyfills.tsx')
-rw-r--r-- | packages/bun-framework-next/server-polyfills.tsx | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/packages/bun-framework-next/server-polyfills.tsx b/packages/bun-framework-next/server-polyfills.tsx index 8f582329a..59c38e92c 100644 --- a/packages/bun-framework-next/server-polyfills.tsx +++ b/packages/bun-framework-next/server-polyfills.tsx @@ -2,25 +2,9 @@ globalThis.global = globalThis; import { Buffer } from "buffer"; import { URL } from "./url-polyfill"; -import { TextEncoder, TextDecoder } from "./text-encoder-polyfill"; import * as React from "react"; const onlyChildPolyfill = React.Children.only; -React.Children.only = function (children) { - if ( - children && - typeof children === "object" && - (children as any).length == 1 - ) { - return onlyChildPolyfill(children[0]); - } - - return onlyChildPolyfill(children); -}; - globalThis.Buffer ||= Buffer; -globalThis.URL ||= URL; -// @ts-expect-error encodeInto is missing in our polyfill -globalThis.TextEncoder ||= TextEncoder; -globalThis.TextDecoder ||= TextDecoder; +globalThis.URL = URL; |