Formatting cleanups for nested conditionals (#902)
* Formatting cleanups for nested conditionals * Transports
This commit is contained in:
@@ -5,6 +5,8 @@ import { xglobal } from '@polkadot/x-global';
|
||||
|
||||
import { TextEncoder as Fallback } from './fallback';
|
||||
|
||||
export const TextEncoder = typeof xglobal.TextEncoder === 'undefined'
|
||||
? Fallback as unknown as typeof xglobal.TextEncoder
|
||||
: xglobal.TextEncoder;
|
||||
export const TextEncoder = (
|
||||
typeof xglobal.TextEncoder === 'undefined'
|
||||
? Fallback as unknown as typeof xglobal.TextEncoder
|
||||
: xglobal.TextEncoder
|
||||
);
|
||||
|
||||
@@ -20,6 +20,8 @@ class NodeFallback {
|
||||
}
|
||||
}
|
||||
|
||||
export const TextEncoder = typeof xglobal.TextEncoder === 'undefined'
|
||||
? NodeFallback as unknown as typeof xglobal.TextEncoder
|
||||
: xglobal.TextEncoder;
|
||||
export const TextEncoder = (
|
||||
typeof xglobal.TextEncoder === 'undefined'
|
||||
? NodeFallback as unknown as typeof xglobal.TextEncoder
|
||||
: xglobal.TextEncoder
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user