From e53d4409ea59441a8c5c0a159ad453428eb3ee6e Mon Sep 17 00:00:00 2001 From: Gaagul Gigi <70290286+gaagul@users.noreply.github.com> Date: Wed, 20 Sep 2023 10:32:55 +0530 Subject: [PATCH] Fixed errors raising in console when clicking outside MediaUploader modal while upload in progress (#893) --- src/components/Editor/MediaUploader/index.jsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Editor/MediaUploader/index.jsx b/src/components/Editor/MediaUploader/index.jsx index d9d857d2..48f5d5ce 100644 --- a/src/components/Editor/MediaUploader/index.jsx +++ b/src/components/Editor/MediaUploader/index.jsx @@ -1,6 +1,7 @@ import React, { useState } from "react"; import { Modal, Tab } from "neetoui"; +import { not } from "ramda"; import { useTranslation } from "react-i18next"; import { isNilOrEmpty } from "utils/common"; @@ -53,8 +54,10 @@ const MediaUploader = ({ mediaUploader, onClose, editor, unsplashApiKey }) => { return (
{!isNilOrEmpty(tabs) && ( @@ -73,9 +76,8 @@ const MediaUploader = ({ mediaUploader, onClose, editor, unsplashApiKey }) => {
{activeTab === "local" && ( )} @@ -90,7 +92,7 @@ const MediaUploader = ({ mediaUploader, onClose, editor, unsplashApiKey }) => { )} {activeTab === "unsplash" && ( )}