Browse Source

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

Artur Paikin 6 years ago
parent
commit
b2206f636f
1 changed files with 3 additions and 1 deletions
  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) {
-  const notOverFileLimit = props.maxNumberOfFiles !== props.totalFileCount
+  const notOverFileLimit = props.maxNumberOfFiles
+    ? props.totalFileCount < props.maxNumberOfFiles
+    : true
 
   return (
     <div class="uppy-DashboardContent-bar">