From 8c817d442b157988bc25cdbf40a431af2d46dd01 Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Wed, 12 Apr 2023 15:28:16 -0400 Subject: [PATCH] refactor: remove duplicate trim call --- .../core/src/components/media-library/common/MediaLibrary.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/src/components/media-library/common/MediaLibrary.tsx b/packages/core/src/components/media-library/common/MediaLibrary.tsx index bcc8ea92..236603b3 100644 --- a/packages/core/src/components/media-library/common/MediaLibrary.tsx +++ b/packages/core/src/components/media-library/common/MediaLibrary.tsx @@ -5,7 +5,6 @@ import { Home as HomeIcon } from '@styled-icons/material/Home'; import { Photo as PhotoIcon } from '@styled-icons/material/Photo'; import fuzzy from 'fuzzy'; import isEmpty from 'lodash/isEmpty'; -import trim from 'lodash/trim'; import { dirname, join } from 'path'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { translate } from 'react-polyglot'; @@ -298,7 +297,7 @@ const MediaLibrary: FC> = ({ if (!config) { return undefined; } - return trim(selectMediaFolder(config, collection, entry, field), '/'); + return selectMediaFolder(config, collection, entry, field); }, [collection, config, entry, field]); const parentFolder = useMemo(() => {