소스 검색

props.totalFileCount < props.maxNumberOfFiles, check to see if maxNumberOfFiles even exists?

Artur Paikin 6 년 전
부모
커밋
b2206f636f
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      packages/@uppy/dashboard/src/components/PanelTopBar.js

+ 3 - 1
packages/@uppy/dashboard/src/components/PanelTopBar.js

@@ -7,7 +7,9 @@ function DashboardContentTitle (props) {
 }
 }
 
 
 function PanelTopBar (props) {
 function PanelTopBar (props) {
-  const notOverFileLimit = props.maxNumberOfFiles !== props.totalFileCount
+  const notOverFileLimit = props.maxNumberOfFiles
+    ? props.totalFileCount < props.maxNumberOfFiles
+    : true
 
 
   return (
   return (
     <div class="uppy-DashboardContent-bar">
     <div class="uppy-DashboardContent-bar">