mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-10 02:30:13 +00:00
Merge branch 'mp/normaliser-safety' into 'develop'
entity_normalizer: safely check screen_name See merge request pleroma/pleroma-fe!1383
This commit is contained in:
commit
3dca3639fd
1 changed files with 1 additions and 1 deletions
|
@ -205,7 +205,7 @@ export const parseUser = (data) => {
|
||||||
|
|
||||||
// Convert punycode to unicode for UI
|
// Convert punycode to unicode for UI
|
||||||
output.screen_name_ui = output.screen_name
|
output.screen_name_ui = output.screen_name
|
||||||
if (output.screen_name.includes('@')) {
|
if (output.screen_name && output.screen_name.includes('@')) {
|
||||||
const parts = output.screen_name.split('@')
|
const parts = output.screen_name.split('@')
|
||||||
let unicodeDomain = punycode.toUnicode(parts[1])
|
let unicodeDomain = punycode.toUnicode(parts[1])
|
||||||
if (unicodeDomain !== parts[1]) {
|
if (unicodeDomain !== parts[1]) {
|
||||||
|
|
Loading…
Reference in a new issue