Formatting cleanups for nested conditionals (#902)

* Formatting cleanups for nested conditionals

* Transports
This commit is contained in:
Jaco Greeff
2021-02-27 11:30:18 +01:00
committed by GitHub
parent 3143e9df1c
commit 843cb3d00a
11 changed files with 50 additions and 40 deletions
+5 -3
View File
@@ -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
);
+5 -3
View File
@@ -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
);