mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 04:13:09 +02:00
refactor
This commit is contained in:
parent
a3cdb4cca1
commit
c7969ef418
1 changed files with 8 additions and 8 deletions
|
@ -24,6 +24,14 @@ import { url as local } from '@/config';
|
|||
import * as os from '@/os';
|
||||
import { useTooltip } from '@/scripts/use-tooltip';
|
||||
|
||||
function safeURIDecode(str: string) {
|
||||
try {
|
||||
return decodeURIComponent(str);
|
||||
} catch {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
url: {
|
||||
|
@ -49,14 +57,6 @@ export default defineComponent({
|
|||
}, {}, 'closed');
|
||||
});
|
||||
|
||||
function safeURIDecode(str: string) {
|
||||
try {
|
||||
return decodeURIComponent(str);
|
||||
} catch {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
local,
|
||||
schema: url.protocol,
|
||||
|
|
Loading…
Reference in a new issue