From 9e9888d002f6b5bb322ff954ccb3deb925b91b1a Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Sun, 17 Sep 2023 20:06:59 +0800 Subject: [PATCH] Remove modal in checkUploadFile() --- web/src/FileTree.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/FileTree.js b/web/src/FileTree.js index ebda4e4..ca54c3c 100644 --- a/web/src/FileTree.js +++ b/web/src/FileTree.js @@ -103,10 +103,12 @@ class FileTree extends React.Component { } checkUploadFile(info) { - for (let i = 0; i < info.fileList.length; i++) { - const filename = info.fileList[i].name; - if (this.getCacheApp(filename) === "" && filename.endsWith(".txt")) { - return true; + if (Conf.EnableExtraPages) { + for (let i = 0; i < info.fileList.length; i++) { + const filename = info.fileList[i].name; + if (this.getCacheApp(filename) === "" && filename.endsWith(".txt")) { + return true; + } } } return false;