1
0
mirror of https://github.com/MisskeyIO/misskey synced 2025-01-09 19:33:49 +09:00
MisskeyIO/packages/frontend/src/scripts/safe-uri-decode.ts

8 lines
124 B
TypeScript
Raw Normal View History

export function safeURIDecode(str: string): string {
try {
return decodeURIComponent(str);
} catch {
return str;
}
}