mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
Fix undefined in account link when ctrl-clicking
This commit is contained in:
parent
497ede1a3d
commit
93bb1da7c9
1 changed files with 3 additions and 0 deletions
|
@ -2,6 +2,7 @@ import './name-text.css';
|
|||
|
||||
import { memo } from 'preact/compat';
|
||||
|
||||
import { api } from '../utils/api';
|
||||
import states from '../utils/states';
|
||||
|
||||
import Avatar from './avatar';
|
||||
|
@ -33,6 +34,8 @@ function NameText({
|
|||
} = account;
|
||||
const [_, acct1, acct2] = acct.match(/([^@]+)(@.+)/i) || [, acct];
|
||||
|
||||
if (!instance) instance = api().instance;
|
||||
|
||||
const trimmedUsername = username.toLowerCase().trim();
|
||||
const trimmedDisplayName = (displayName || '').toLowerCase().trim();
|
||||
const shortenedDisplayName = trimmedDisplayName
|
||||
|
|
Loading…
Add table
Reference in a new issue