From 797fb4724300981c98bf1315cf99a63b6be497ff Mon Sep 17 00:00:00 2001 From: Tyler Brown Cifu Shuster Date: Thu, 17 Sep 2020 20:26:19 -0700 Subject: [PATCH] links: prevents title from being overwritten fixes #3481 --- .../src/views/apps/links/components/lib/link-submit.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/apps/links/components/lib/link-submit.tsx b/pkg/interface/src/views/apps/links/components/lib/link-submit.tsx index 1c78aacc5..f20f3f7d3 100644 --- a/pkg/interface/src/views/apps/links/components/lib/link-submit.tsx +++ b/pkg/interface/src/views/apps/links/components/lib/link-submit.tsx @@ -83,11 +83,11 @@ export class LinkSubmit extends Component { fetch(`https://noembed.com/embed?url=${linkValue}`) .then(response => response.json()) .then((result) => { - if (result.title) { + if (result.title && !this.state.linkTitle) { this.setState({ linkTitle: result.title }); } }).catch((error) => {/*noop*/}); - } else { + } else if (!this.state.linkTitle) { this.setState({ linkTitle: decodeURIComponent(linkValue .split('/')