From fc704f07cf61dbe6df61016bf35a0ab689eacffb Mon Sep 17 00:00:00 2001 From: Mads Lee Giil Date: Mon, 18 Nov 2024 13:49:44 +0100 Subject: [PATCH] Fiks initialState-objekt --- src/moduler/feilmelding/feil-slice.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/moduler/feilmelding/feil-slice.ts b/src/moduler/feilmelding/feil-slice.ts index 2c1b39af4..9aea47058 100644 --- a/src/moduler/feilmelding/feil-slice.ts +++ b/src/moduler/feilmelding/feil-slice.ts @@ -25,9 +25,9 @@ import { import { oppdaterMal } from '../mal/aktivitetsmal-slice'; type FeilState = { - serializedError: Record - feilEier: string | undefined -} + serializedError: Record; + feilEier: string | undefined; +}; const dismissableErrors = [ flyttAktivitet.rejected.type, @@ -45,7 +45,10 @@ const dismissableErrors = [ const errorSlice = createSlice({ name: 'feil', - initialState: {} as FeilState, + initialState: { + serializedError: {}, + feilEier: undefined, + } as FeilState, reducers: { setErPĂ„AnnenBrukersResssurs: (state, payload: PayloadAction) => { console.log('Setter feil');