Skip to content

Commit

Permalink
fix(MoveModal): Remove some proptypes errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Aug 31, 2023
1 parent d92877a commit 0834e1f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/drive/web/modules/filelist/File.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ File.propTypes = {
t: PropTypes.func,
f: PropTypes.func,
attributes: PropTypes.object.isRequired,
actions: PropTypes.array.isRequired,
actions: PropTypes.array,
isRenaming: PropTypes.bool,
withSelectionCheckbox: PropTypes.bool.isRequired,
withFilePath: PropTypes.bool,
Expand Down
5 changes: 2 additions & 3 deletions src/drive/web/modules/move/FileList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { isEncryptedFolder } from 'drive/lib/encryption'
const isInvalidMoveTarget = (subjects, target) => {
const isASubject = subjects.find(subject => subject._id === target._id)
const isAFile = target.type === 'file'

return isAFile || isASubject
return isAFile || isASubject !== undefined
}

const FileList = ({ targets, files, folder, navigateTo }) => {
Expand All @@ -36,7 +35,7 @@ const FileList = ({ targets, files, folder, navigateTo }) => {
styleDisabled={isInvalidMoveTarget(targets, file)}
attributes={file}
displayedFolder={null}
actions={[]}
actions={null}
isRenaming={false}
onFolderOpen={id => navigateTo(files.find(f => f.id === id))}
onFileOpen={() => {}}
Expand Down
2 changes: 1 addition & 1 deletion src/drive/web/modules/move/Topbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const MoveTopbar = (

MoveTopbar.propTypes = {
navigateTo: PropTypes.func.isRequired,
currentDir: PropTypes.object.isRequired,
currentDir: PropTypes.object,
fetchStatus: PropTypes.string.isRequired,
breakpoints: PropTypes.shape({
isMobile: PropTypes.bool
Expand Down

0 comments on commit 0834e1f

Please sign in to comment.