Performance fixes
This commit is contained in:
parent
ad41d90a45
commit
07abe66af1
|
@ -44,6 +44,7 @@ export const install: InitModule = ({ store, router }) => {
|
|||
content: error.response?.data,
|
||||
class: 'error'
|
||||
})
|
||||
break
|
||||
|
||||
case 403:
|
||||
error.backendErrors.push('Permission denied')
|
||||
|
|
|
@ -31,17 +31,8 @@ export function parseAPIErrors (responseData: APIErrorResponse, parentField?: st
|
|||
return errors
|
||||
}
|
||||
|
||||
export function getCookie (name: string) {
|
||||
return document.cookie
|
||||
.split('; ')
|
||||
.find(row => row.startsWith(name))
|
||||
?.split('=')[1]
|
||||
}
|
||||
|
||||
export function getDomain (url: string) {
|
||||
const parser = document.createElement('a')
|
||||
parser.href = url
|
||||
return parser.hostname
|
||||
return new URL(url).hostname
|
||||
}
|
||||
|
||||
export function arrayMove (arr: unknown[], oldIndex: number, newIndex: number) {
|
||||
|
|
Loading…
Reference in New Issue