Make map on narrative center in first, keep eth in scope

This commit is contained in:
Franc Camps-Febrer
2019-01-09 07:52:52 +01:00
committed by Lachlan Kermode
parent aa3da2d744
commit 7beb5f4039
3 changed files with 32 additions and 13 deletions

View File

@@ -60,8 +60,8 @@ class Timeline extends React.Component {
}
if (hash(nextProps.app.selected) !== hash(this.props.app.selected)) {
if (nextProps.app.selected !== null) {
this.onCenterTime(parseDate(nextProps.app.selected[0].timestamp));
if (!!nextProps.app.selected && nextProps.app.selected.length > 0) {
this.onCenterTime(parseDate(nextProps.app.selected[0].timestamp));
}
}
}