diff options
author | kibigo! <marrus-sh@users.noreply.github.com> | 2017-07-15 15:10:06 -0700 |
---|---|---|
committer | kibigo! <marrus-sh@users.noreply.github.com> | 2017-07-15 15:10:06 -0700 |
commit | bc4202d00b2956b630a7609fb74f31c04e9275f3 (patch) | |
tree | c56bc43d1df6f67168b4d2f82328bd1c3ca5309d /app/javascript/glitch/components/status/index.js | |
parent | 09cfc079b0958c42fe619e2d88c3f9fd1d7c7900 (diff) |
Ported updates from #64
Diffstat (limited to 'app/javascript/glitch/components/status/index.js')
-rw-r--r-- | app/javascript/glitch/components/status/index.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/javascript/glitch/components/status/index.js b/app/javascript/glitch/components/status/index.js index 314e8b51c..4a91b5aa3 100644 --- a/app/javascript/glitch/components/status/index.js +++ b/app/javascript/glitch/components/status/index.js @@ -507,6 +507,7 @@ applicable. const { router } = this.context; const { status } = this.props; const { isExpanded } = this.state; + if (!router) return; if (destination === undefined) { destination = `/statuses/${ status.getIn(['reblog', 'id'], status.get('id')) @@ -532,7 +533,13 @@ this operation are further explained in the code below. */ render () { - const { parseClick, setExpansion, handleRef } = this; + const { + parseClick, + setExpansion, + saveHeight, + handleRef, + } = this; + const { router } = this.context; const { status, account, @@ -706,9 +713,10 @@ collapsed. media={media} mediaIcon={mediaIcon} expanded={isExpanded} - setExpansion={this.setExpansion} - onHeightUpdate={this.saveHeight} + setExpansion={setExpansion} + onHeightUpdate={saveHeight} parseClick={parseClick} + disabled={!router} /> {isExpanded !== false ? ( <StatusActionBar |