From 46fa65f25a2dfabc3d51c3dd6d5340dbb25355de Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 27 Aug 2018 19:32:30 -0700 Subject: [PATCH] fix null error in profile (#506) --- .../dialog/components/AccountProfileOptionsDialog.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/_components/dialog/components/AccountProfileOptionsDialog.html b/routes/_components/dialog/components/AccountProfileOptionsDialog.html index ec24976..b303bcc 100644 --- a/routes/_components/dialog/components/AccountProfileOptionsDialog.html +++ b/routes/_components/dialog/components/AccountProfileOptionsDialog.html @@ -37,8 +37,8 @@ export default { followRequested: ({ relationship }) => relationship && relationship.requested, accountId: ({ account }) => account && account.id, acct: ({ account }) => account.acct, - muting: ({ relationship }) => relationship.muting, - blocking: ({ relationship }) => relationship.blocking, + muting: ({ relationship }) => relationship && relationship.muting, + blocking: ({ relationship }) => relationship && relationship.blocking, followLabel: ({ following, followRequested, account, acct }) => { if (typeof following === 'undefined' || !account) { return '' @@ -62,14 +62,14 @@ export default { // // end copypasta (StatusOptionsDialog.html / AccountProfileOptionsDialog.html) // - showingReblogs: ({ relationship }) => !!relationship.showing_reblogs, + showingReblogs: ({ relationship }) => relationship ? relationship.showing_reblogs : true, showReblogsLabel: ({ showingReblogs, acct }) => ( showingReblogs ? `Hide boosts from @${acct}` : `Show boosts from @${acct}` ), domain: ({ acct }) => acct.split('@')[1], - blockingDomain: ({ relationship }) => !!relationship.domain_blocking, + blockingDomain: ({ relationship }) => relationship && relationship.domain_blocking, blockDomainLabel: ({ blockingDomain, domain }) => ( blockingDomain ? `Unhide ${domain}`