Merge pull request #1552 from lbryio/issue-1549

fix 1549
This commit is contained in:
Sean Yesmunt 2018-06-05 12:12:15 -04:00 committed by GitHub
commit 9740fffac5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -64,8 +64,12 @@ export default appState => {
// path, so we just strip it off.
// - In a URI with a claim ID, like lbry://channel#claimid, Windows interprets the hash mark as
// an anchor and converts it to lbry://channel/#claimid. We remove the slash here as well.
// - ? also interpreted as an anchor, remove slash also.
if (process.platform === 'win32') {
deepLinkingURI = deepLinkingURI.replace(/\/$/, '').replace('/#', '#');
deepLinkingURI = deepLinkingURI
.replace(/\/$/, '')
.replace('/#', '#')
.replace('/?', '?');
}
} else {
deepLinkingURI = appState.macDeepLinkingURI;

View file

@ -49,7 +49,7 @@ class RewardsPage extends React.PureComponent<Props> {
renderPageHeader() {
const { doAuth, navigate, user, daemonSettings } = this.props;
if (user && !user.is_reward_approved && daemonSettings.share_usage_data) {
if (user && !user.is_reward_approved && daemonSettings && daemonSettings.share_usage_data) {
if (!user.primary_email || !user.has_verified_email || !user.is_identity_verified) {
return (
<section className="card card--section">
@ -98,7 +98,7 @@ class RewardsPage extends React.PureComponent<Props> {
renderUnclaimedRewards() {
const { fetching, rewards, user, daemonSettings, navigate } = this.props;
if (!daemonSettings.share_usage_data) {
if (daemonSettings && !daemonSettings.share_usage_data) {
return (
<div className="card card--section">
<div className="card__title">{__('Disabled')}</div>