strictNullChecks (#4666)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
This commit is contained in:
parent
4ee40c3345
commit
987168b863
214 changed files with 939 additions and 785 deletions
|
@ -2,7 +2,7 @@ import config from '../config';
|
|||
import { toASCII } from 'punycode';
|
||||
import { URL } from 'url';
|
||||
|
||||
export function getFullApAccount(username: string, host: string) {
|
||||
export function getFullApAccount(username: string, host: string | null) {
|
||||
return host ? `${username}@${toPuny(host)}` : `${username}@${toPuny(config.host)}`;
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,5 @@ export function extractDbHost(uri: string) {
|
|||
}
|
||||
|
||||
export function toPuny(host: string) {
|
||||
if (host == null) return null;
|
||||
return toASCII(host.toLowerCase());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue