Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Allow no recordId to be passed in #347

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions client/src/components/HistoryViewer/HistoryViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,11 @@ class HistoryViewer extends Component {
}

render() {
const { loading, compare, currentVersion } = this.props;
const { loading, compare, currentVersion, recordId } = this.props;

if (!recordId) {
return null;
}

if (loading) {
return <Loading />;
Expand All @@ -391,7 +395,7 @@ HistoryViewer.propTypes = {
limit: PropTypes.number,
ListComponent: PropTypes.elementType.isRequired,
offset: PropTypes.number,
recordId: PropTypes.number.isRequired,
recordId: PropTypes.number,
currentVersion: PropTypes.oneOfType([PropTypes.bool, versionType]),
compare: compareType,
isInGridField: PropTypes.bool,
Expand Down
Loading