From 7f3afdcce81d6a053122b47f499b9d09049c63bf Mon Sep 17 00:00:00 2001 From: "Matthew Riley MacPherson (tofumatt)" Date: Mon, 25 Jun 2018 22:14:28 +0100 Subject: [PATCH] Use getCurrentPost() to get the link --- editor/components/post-permalink/index.js | 13 ++++++++----- editor/store/selectors.js | 11 ----------- editor/store/test/selectors.js | 21 --------------------- 3 files changed, 8 insertions(+), 37 deletions(-) diff --git a/editor/components/post-permalink/index.js b/editor/components/post-permalink/index.js index 40f33632f9c894..e81302a486cdc1 100644 --- a/editor/components/post-permalink/index.js +++ b/editor/components/post-permalink/index.js @@ -56,11 +56,11 @@ class PostPermalink extends Component { } render() { - const { isNew, previewLink, isEditable, samplePermalink, isPublished } = this.props; + const { isNew, postLink, isEditable, samplePermalink, isPublished } = this.props; const { isCopied, isEditingPermalink } = this.state; const ariaLabel = isCopied ? __( 'Permalink copied' ) : __( 'Copy the permalink' ); - if ( isNew ) { + if ( isNew || ! postLink ) { return null; } @@ -80,7 +80,7 @@ class PostPermalink extends Component { { ! isEditingPermalink &&