mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
Fix bug
This commit is contained in:
parent
639aa8197a
commit
baf6ccf659
@ -92,6 +92,10 @@ const handlers: { [key: string]: (window: any, token: any, mentionedRemoteUsers:
|
||||
};
|
||||
|
||||
export default (tokens: TextElement[], mentionedRemoteUsers: INote['mentionedRemoteUsers'] = []) => {
|
||||
if (tokens == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { window } = new JSDOM('');
|
||||
|
||||
for (const token of tokens) {
|
||||
|
@ -43,8 +43,7 @@ export type TextElement = { type: 'text', content: string }
|
||||
export type TextElementProcessor = (text: string, i: number) => TextElement | TextElement[];
|
||||
|
||||
export default (source: string): TextElement[] => {
|
||||
|
||||
if (source == '') {
|
||||
if (source == null || source == '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user