From 14bcb813cc53bd47ff445f81fcc03d7ceb022654 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 13 Apr 2019 15:09:16 +0900 Subject: [PATCH] Update migrate.ts --- src/migrate.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/migrate.ts b/src/migrate.ts index 614b20cae2..18217f4085 100644 --- a/src/migrate.ts +++ b/src/migrate.ts @@ -24,9 +24,14 @@ import { UserPublickey } from './models/entities/user-publickey'; import { UserKeypair } from './models/entities/user-keypair'; import { extractPublic } from './crypto_key'; import { Emoji } from './models/entities/emoji'; -import { toPuny } from './misc/convert-host'; +import { toPuny as _toPuny } from './misc/convert-host'; import { UserProfile } from './models/entities/user-profile'; +function toPuny(x: string | null): string | null { + if (x == null) return null; + return _toPuny(x); +} + const u = (config as any).mongodb.user ? encodeURIComponent((config as any).mongodb.user) : null; const p = (config as any).mongodb.pass ? encodeURIComponent((config as any).mongodb.pass) : null;