Files
common/packages/x-textdecoder/src/browser.ts
T
2021-01-03 11:20:22 +01:00

9 lines
311 B
TypeScript

// Copyright 2017-2021 @polkadot/x-textencoder authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { TextDecoder as Fallback } from './fallback';
export const TextDecoder = typeof global.TextDecoder === 'undefined'
? Fallback as unknown as typeof global.TextDecoder
: global.TextDecoder;