mirror of
https://github.com/ItsVipra/ProToots
synced 2024-11-10 14:14:19 +00:00
Return error for undefined accounts
This commit is contained in:
parent
43adaf4a61
commit
4720af6c58
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ import { hasClasses } from "./domhelpers";
|
|||
* @returns {string}
|
||||
*/
|
||||
export function normaliseAccountName(name) {
|
||||
if (!name) return "null";
|
||||
if (!name) throw new Error("null/undefined passed to normaliseAccountName");
|
||||
if (name[0] == "@") name = name.substring(1);
|
||||
// if the username doesn't contain an @ (i.e. the post we're looking at is from this instance)
|
||||
// append the host name to it, to avoid cache overlap between instances
|
||||
|
|
Loading…
Reference in a new issue