Skip to content

Commit

Permalink
fix(core-metadata): eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineribeyre committed Aug 7, 2018
1 parent 1492705 commit c357338
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/CoreMetadata/CoreMetadataHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function canUserDownload(user, projectAvail, projectID) {
hasAccess = true;
}
}
return True;
return hasAccess;
}

Expand Down Expand Up @@ -97,4 +98,9 @@ CoreMetadataHeader.propTypes = {
projectAvail: PropTypes.object.isRequired,
};

CoreMetadataHeader.defaultProps = {
metadata: null,
error: null,
};

export default CoreMetadataHeader;
4 changes: 4 additions & 0 deletions src/CoreMetadata/CoreMetadataTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ CoreMetadataTable.propTypes = {
metadata: PropTypes.object,
};

CoreMetadataTable.defaultProps = {
metadata: null,
};

export default CoreMetadataTable;
8 changes: 6 additions & 2 deletions src/components/FileTypePicture.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function dataFormatToFileType(dictIcons, dataFormat) {

class FileTypePicture extends Component {
render() {
const data_format = this.props.metadata ? this.props.metadata.data_format : 'file'
const fileType = dataFormatToFileType(this.props.dictIcons, data_format);
const dataFormat = this.props.metadata ? this.props.metadata.data_format : 'file'
const fileType = dataFormatToFileType(this.props.dictIcons, dataFormat);
if (!fileType) return null;
const content = (
<WhiteContainer>
Expand All @@ -48,4 +48,8 @@ FileTypePicture.propTypes = {
dictIcons: PropTypes.object.isRequired,
};

FileTypePicture.defaultProps = {
metadata: null,
};

export default FileTypePicture;

0 comments on commit c357338

Please sign in to comment.