From 63f7c633e2069996e1b32912a3ad5ae20665ebb3 Mon Sep 17 00:00:00 2001 From: Vladan Ostojic Date: Mon, 20 Nov 2017 15:46:48 +0100 Subject: [PATCH 1/3] fix links autocomplete suggestions: empty post title fallback --- blocks/url-input/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/url-input/index.js b/blocks/url-input/index.js index 6a6f74e87b395..668b63cc25b6f 100644 --- a/blocks/url-input/index.js +++ b/blocks/url-input/index.js @@ -215,7 +215,7 @@ class UrlInput extends Component { onClick={ () => this.props.onChange( post.link ) } aria-selected={ index === selectedSuggestion } > - { post.title.rendered } + { post.title.rendered || `( ${ __( 'no title' ) } )` } ) ) } From 4dee5503a64c9e0bcdff4c7436c5f22b383f839e Mon Sep 17 00:00:00 2001 From: Vladan Ostojic Date: Mon, 20 Nov 2017 16:53:47 +0100 Subject: [PATCH 2/3] simplify no title fallback --- blocks/url-input/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/url-input/index.js b/blocks/url-input/index.js index 668b63cc25b6f..d329a0390bf57 100644 --- a/blocks/url-input/index.js +++ b/blocks/url-input/index.js @@ -215,7 +215,7 @@ class UrlInput extends Component { onClick={ () => this.props.onChange( post.link ) } aria-selected={ index === selectedSuggestion } > - { post.title.rendered || `( ${ __( 'no title' ) } )` } + { post.title.rendered || __( 'no title' ) } ) ) } From e40066db915bc14749833b0fb621b9e1ba6f2d0c Mon Sep 17 00:00:00 2001 From: Vladan Ostojic Date: Tue, 21 Nov 2017 12:31:34 +0100 Subject: [PATCH 3/3] adding parentheses to fallback titles --- blocks/url-input/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/url-input/index.js b/blocks/url-input/index.js index d329a0390bf57..0a07235b59540 100644 --- a/blocks/url-input/index.js +++ b/blocks/url-input/index.js @@ -215,7 +215,7 @@ class UrlInput extends Component { onClick={ () => this.props.onChange( post.link ) } aria-selected={ index === selectedSuggestion } > - { post.title.rendered || __( 'no title' ) } + { post.title.rendered || __( '(no title)' ) } ) ) }