Files
common/packages/util/src/u8a/polyfill/textEncoder.ts
T
2018-06-27 10:15:46 +02:00

10 lines
324 B
TypeScript

// Copyright 2017-2018 @polkadot/util authors & contributors
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// tslint:disable-next-line
if (typeof TextEncoder === 'undefined') {
// @ts-ignore
global.TextEncoder = require('util').TextEncoder;
}