Render Falsey Contract Outputs (#1684)

This commit is contained in:
William O'Beirne 2018-04-26 14:19:54 -04:00 committed by Daniel Ternyak
parent df2c3bc7fd
commit 4f6dde23c0

View File

@ -127,7 +127,8 @@ class InteractExplorerClass extends Component<Props, State> {
{selectedFunction.contract.outputs.map((output: any, index: number) => { {selectedFunction.contract.outputs.map((output: any, index: number) => {
const { type, name } = output; const { type, name } = output;
const parsedName = name === '' ? index : name; const parsedName = name === '' ? index : name;
const rawFieldValue = outputs[parsedName] || ''; const o = outputs[parsedName];
const rawFieldValue = o === null || o === undefined ? '' : o;
const decodedFieldValue = Buffer.isBuffer(rawFieldValue) const decodedFieldValue = Buffer.isBuffer(rawFieldValue)
? bufferToHex(rawFieldValue) ? bufferToHex(rawFieldValue)
: rawFieldValue; : rawFieldValue;