mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 17:41:33 +03:00
parent
6f5663bcd3
commit
797fb47243
@ -83,11 +83,11 @@ export class LinkSubmit extends Component<LinkSubmitProps, LinkSubmitState> {
|
||||
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('/')
|
||||
|
Loading…
Reference in New Issue
Block a user