try tu update
This commit is contained in:
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@@ -1205,7 +1205,7 @@ packages:
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001642
|
||||
electron-to-chromium: 1.4.828
|
||||
electron-to-chromium: 1.4.829
|
||||
node-releases: 2.0.17
|
||||
update-browserslist-db: 1.1.0(browserslist@4.23.2)
|
||||
dev: true
|
||||
@@ -1426,8 +1426,8 @@ packages:
|
||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
||||
dev: true
|
||||
|
||||
/electron-to-chromium@1.4.828:
|
||||
resolution: {integrity: sha512-QOIJiWpQJDHAVO4P58pwb133Cwee0nbvy/MV1CwzZVGpkH1RX33N3vsaWRCpR6bF63AAq366neZrRTu7Qlsbbw==}
|
||||
/electron-to-chromium@1.4.829:
|
||||
resolution: {integrity: sha512-5qp1N2POAfW0u1qGAxXEtz6P7bO1m6gpZr5hdf5ve6lxpLM7MpiM4jIPz7xcrNlClQMafbyUDDWjlIQZ1Mw0Rw==}
|
||||
dev: true
|
||||
|
||||
/emoji-regex@8.0.0:
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// @ts-expect-error use import var
|
||||
export const env: envProps = import.meta.env
|
||||
|
||||
|
||||
interface envProps {
|
||||
BASE_URL: string,
|
||||
DEV: boolean,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import {AxiosError} from "axios"
|
||||
|
||||
export function displayFormErrors(error: ValidationErrors, form: HTMLElement|null = null) {
|
||||
export function displayFormErrors(error: ValidationErrors|AxiosError, form: HTMLElement|null = null) {
|
||||
if (error.response && error.response.status === 422) {
|
||||
// @ts-ignore
|
||||
const errors = error.response.data.errors
|
||||
const formBase = (form) ? form : document.body
|
||||
Object.entries(errors).forEach(([key, value]) => {
|
||||
|
||||
Reference in New Issue
Block a user