null/undefined checks for boolean

This commit is contained in:
Jaco Greeff
2018-08-14 14:07:28 +02:00
parent 14ac098bb4
commit 8ce2b87e87
@@ -4,8 +4,11 @@
import { Param$Decoded } from '../../types';
import isNull from '@polkadot/util/is/null';
import isUndefined from '@polkadot/util/is/undefined';
export default function bool (input: Uint8Array | null | undefined): Param$Decoded {
if (!input) {
if (isUndefined(input) || isNull(input)) {
return {
length: 0,
value: false