mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-28 10:22:38 +03:00
updated a bit
This commit is contained in:
parent
65c92982b1
commit
2b950da441
@ -60,9 +60,9 @@ const postImage = (metaData, body) => {
|
||||
|
||||
if (metaData && metaData.image && metaData.image[0]) {
|
||||
imageLink = metaData.image[0];
|
||||
} else if (markdownImageRegex.test(body)) {
|
||||
} else if (body && markdownImageRegex.test(body)) {
|
||||
const markdownMatch = body.match(markdownImageRegex);
|
||||
if (markdownMatch) {
|
||||
if (markdownMatch[0]) {
|
||||
const firstMarkdownMatch = markdownMatch[0];
|
||||
imageLink = firstMarkdownMatch.match(urlRegex)[0];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user