Fix crash if viewing the orch inspector before 3box info loads in

This commit is contained in:
Marco van Dijk 2022-04-28 11:39:36 +02:00
parent 5774d69ffc
commit 3ce2a36ac0
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ const Address = (obj) => {
} }
} }
// Lookup current info in cache only if this addr has a mapped ENS domain // Lookup current info in cache only if this addr has a mapped ENS domain
if (thisDomain && thisDomain.domain) { if (thisDomain && thisDomain.domain && livepeer.ensInfoMapping && livepeer.ensInfoMapping.length) {
for (const thisAddr of livepeer.ensInfoMapping) { for (const thisAddr of livepeer.ensInfoMapping) {
if (thisAddr.domain === thisDomain.domain) { if (thisAddr.domain === thisDomain.domain) {
thisInfo = thisAddr; thisInfo = thisAddr;

View File

@ -88,7 +88,7 @@ const OrchInfoViewer = (obj) => {
} }
} }
// Lookup current info in cache only if this addr has a mapped ENS domain // Lookup current info in cache only if this addr has a mapped ENS domain
if (thisDomain && thisDomain.domain) { if (thisDomain && thisDomain.domain && livepeer.ensInfoMapping && livepeer.ensInfoMapping.length) {
for (const thisAddr of livepeer.ensInfoMapping) { for (const thisAddr of livepeer.ensInfoMapping) {
if (thisAddr.domain === thisDomain.domain) { if (thisAddr.domain === thisDomain.domain) {
thisInfo = thisAddr; thisInfo = thisAddr;
@ -178,7 +178,7 @@ const OrchInfoViewer = (obj) => {
} }
return ( return (
<div className="row"> <div className="row" style={{maxWidth: '500px'}}>
<div className="stroke sideMargin"> <div className="stroke sideMargin">
<div className="verticalDivider" /> <div className="verticalDivider" />
<div className="row"> <div className="row">