Fix enlargement of freshly loaded avatars

This commit is contained in:
Cohee
2023-06-07 17:16:44 +03:00
parent cd4d96acab
commit 68830e3262
2 changed files with 7 additions and 4 deletions

View File

@ -404,3 +404,8 @@ export class IndexedDBStore {
});
}
}
export function isDataURL(str) {
const regex = /^data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)*;?)?(base64)?,([a-z0-9!$&',()*+;=\-_%.~:@\/?#]+)?$/i;
return regex.test(str);
}