From 4c2c38f3a486cee2466be801623b6ed15acbf48a Mon Sep 17 00:00:00 2001 From: Gaagul Gigi Date: Wed, 20 Sep 2023 10:28:05 +0530 Subject: [PATCH] Fixed errors raising in console when clicking outside MediaUploader modal while upload in progress --- 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" && ( )}