diff --git a/src/components/flow/actions/addurn/AddURN.tsx b/src/components/flow/actions/addurn/AddURN.tsx index 9e49357fb..2845f28d4 100644 --- a/src/components/flow/actions/addurn/AddURN.tsx +++ b/src/components/flow/actions/addurn/AddURN.tsx @@ -6,10 +6,14 @@ import i18n from 'config/i18n'; export const MAX_TO_SHOW = 3; -const AddURNComp: React.SFC = ({ scheme, path }): JSX.Element => ( - <> - {i18n.t('add', 'Add')} {getSchemeObject(scheme).name} {path} - -); +const AddURNComp: React.SFC = ({ scheme, path }): JSX.Element => { + const schemeObject = getSchemeObject(scheme); + const schemeName = schemeObject ? schemeObject.name : scheme; + return ( + <> + {i18n.t('add', 'Add')} {schemeName} {path} + + ); +}; export default AddURNComp; diff --git a/src/components/flow/actions/addurn/__snapshots__/AddURNForm.test.tsx.snap b/src/components/flow/actions/addurn/__snapshots__/AddURNForm.test.tsx.snap index 5274361af..0b3557f6b 100644 --- a/src/components/flow/actions/addurn/__snapshots__/AddURNForm.test.tsx.snap +++ b/src/components/flow/actions/addurn/__snapshots__/AddURNForm.test.tsx.snap @@ -202,6 +202,11 @@ exports[`AddURNForm renders 1`] = ` > Twitter ID +