fix: text is undefined in masto status api
This commit is contained in:
parent
25e5256fe6
commit
806a76c5ca
@ -156,7 +156,7 @@ export class ApiStatusMastodon {
|
|||||||
) {
|
) {
|
||||||
body = normalizeQuery(body);
|
body = normalizeQuery(body);
|
||||||
}
|
}
|
||||||
const text = body.status;
|
const text = body.status ? body.status : '';
|
||||||
const removed = text.replace(/@\S+/g, '').replace(/\s|/g, '');
|
const removed = text.replace(/@\S+/g, '').replace(/\s|/g, '');
|
||||||
const isDefaultEmoji = emojiRegexAtStartToEnd.test(removed);
|
const isDefaultEmoji = emojiRegexAtStartToEnd.test(removed);
|
||||||
const isCustomEmoji = /^:[a-zA-Z0-9@_]+:$/.test(removed);
|
const isCustomEmoji = /^:[a-zA-Z0-9@_]+:$/.test(removed);
|
||||||
|
Loading…
Reference in New Issue
Block a user