[backend] [client] Import the proper userland punycode module
This commit is contained in:
parent
9cc900faae
commit
13e93dc461
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
import { URL } from "node:url";
|
||||
import config from "@/config/index.js";
|
||||
import { toASCII } from "punycode";
|
||||
import punycode from "punycode/";
|
||||
|
||||
export function getFullApAccount(username: string, host: string | null) {
|
||||
return host
|
||||
|
@ -19,10 +19,10 @@ export function extractDbHost(uri: string) {
|
|||
}
|
||||
|
||||
export function toPuny(host: string) {
|
||||
return toASCII(host.toLowerCase());
|
||||
return punycode.toASCII(host.toLowerCase());
|
||||
}
|
||||
|
||||
export function toPunyNullable(host: string | null | undefined): string | null {
|
||||
if (host == null) return null;
|
||||
return toASCII(host.toLowerCase());
|
||||
return punycode.toASCII(host.toLowerCase());
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { toUnicode } from "punycode";
|
||||
import { toUnicode } from "punycode/";
|
||||
import {} from "vue";
|
||||
import { host as localHost } from "@/config";
|
||||
import { $i } from "@/account";
|
||||
|
|
Loading…
Reference in a new issue