fix: [AA-1219] Crash when locked content rendered without unit ID (#878)
Allows SequenceNavigation to complete rendering even if unitId is not provided.
This commit is contained in:
@@ -69,8 +69,13 @@ UnitButton.defaultProps = {
|
||||
showCompletion: true,
|
||||
};
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
...state.models.units[props.unitId],
|
||||
});
|
||||
const mapStateToProps = (state, props) => {
|
||||
if (props.unitId) {
|
||||
return {
|
||||
...state.models.units[props.unitId],
|
||||
};
|
||||
}
|
||||
return {};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(UnitButton);
|
||||
|
||||
Reference in New Issue
Block a user