From 29fa4fa34dfcfe81390d300c2d4f08be62204467 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Tue, 4 Oct 2022 23:24:07 +0200 Subject: [PATCH] Fixed incorrectly inferred types --- src/short-urls/reducers/shortUrlsList.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/short-urls/reducers/shortUrlsList.ts b/src/short-urls/reducers/shortUrlsList.ts index be70885a..fdf2e4c0 100644 --- a/src/short-urls/reducers/shortUrlsList.ts +++ b/src/short-urls/reducers/shortUrlsList.ts @@ -9,6 +9,7 @@ import { ShlinkShortUrlsListParams, ShlinkShortUrlsResponse } from '../../api/ty import { DeleteShortUrlAction, SHORT_URL_DELETED } from './shortUrlDeletion'; import { CREATE_SHORT_URL, CreateShortUrlAction } from './shortUrlCreation'; import { SHORT_URL_EDITED, ShortUrlEditedAction } from './shortUrlEdition'; +import { ShortUrl } from '../data'; export const LIST_SHORT_URLS_START = 'shlink/shortUrlsList/LIST_SHORT_URLS_START'; export const LIST_SHORT_URLS_ERROR = 'shlink/shortUrlsList/LIST_SHORT_URLS_ERROR'; @@ -46,7 +47,7 @@ export default buildReducer({ [SHORT_URL_DELETED]: pipe( (state: ShortUrlsList, { shortCode, domain }: DeleteShortUrlAction) => (!state.shortUrls ? state : assocPath( ['shortUrls', 'data'], - reject((shortUrl) => shortUrlMatches(shortUrl, shortCode, domain), state.shortUrls.data), + reject((shortUrl) => shortUrlMatches(shortUrl, shortCode, domain), state.shortUrls.data), state, )), (state) => (!state.shortUrls ? state : assocPath(