fix: crash on share modal
This happens randomly or when the claim is not confirmed but accessed via wallet page. Added note to use cmd/ctrl-R to refresh in cases the button doesn't work.
This commit is contained in:
parent
2f318cbf5e
commit
8bdf2b0461
2 changed files with 3 additions and 3 deletions
|
@ -83,7 +83,7 @@ class ErrorBoundary extends React.Component<Props, State> {
|
||||||
label={__('refreshing the app')}
|
label={__('refreshing the app')}
|
||||||
onClick={this.refresh}
|
onClick={this.refresh}
|
||||||
/>{' '}
|
/>{' '}
|
||||||
{__('to fix it')}.
|
{__("to fix it. If that doesn't work, press CMD/CTRL-R to reset to the homepage.")}.
|
||||||
</p>
|
</p>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,11 +26,11 @@ class SocialShare extends React.PureComponent<Props> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { claim } = this.props;
|
const { claim } = this.props;
|
||||||
const { canonical_url: canonicalUrl } = claim;
|
const { canonical_url: canonicalUrl, permanent_url: permanentUrl } = claim;
|
||||||
const { speechShareable, onDone } = this.props;
|
const { speechShareable, onDone } = this.props;
|
||||||
const lbryTvPrefix = 'https://beta.lbry.tv/';
|
const lbryTvPrefix = 'https://beta.lbry.tv/';
|
||||||
const lbryPrefix = 'https://open.lbry.com/';
|
const lbryPrefix = 'https://open.lbry.com/';
|
||||||
const lbryUri = canonicalUrl.split('lbry://')[1];
|
const lbryUri = canonicalUrl ? canonicalUrl.split('lbry://')[1] : permanentUrl.split('lbry://')[1];
|
||||||
const lbryWebUrl = lbryUri.replace(/#/g, ':');
|
const lbryWebUrl = lbryUri.replace(/#/g, ':');
|
||||||
const encodedLbryURL: string = `${lbryPrefix}${encodeURIComponent(lbryWebUrl)}`;
|
const encodedLbryURL: string = `${lbryPrefix}${encodeURIComponent(lbryWebUrl)}`;
|
||||||
const lbryURL: string = `${lbryPrefix}${lbryWebUrl}`;
|
const lbryURL: string = `${lbryPrefix}${lbryWebUrl}`;
|
||||||
|
|
Loading…
Reference in a new issue