datatrails: quick bugfix: handle undefined step (#87337)
fix: handle undefined step
This commit is contained in:
@@ -94,8 +94,10 @@ export class DataTrail extends SceneObjectBase<DataTrailState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Disconnects the current step history state from the current state, to prevent changes affecting history state
|
// Disconnects the current step history state from the current state, to prevent changes affecting history state
|
||||||
const currentState = this.state.history.state.steps[this.state.history.state.currentStep].trailState;
|
const currentState = this.state.history.state.steps[this.state.history.state.currentStep]?.trailState;
|
||||||
this.restoreFromHistoryStep(currentState);
|
if (currentState) {
|
||||||
|
this.restoreFromHistoryStep(currentState);
|
||||||
|
}
|
||||||
|
|
||||||
this.enableUrlSync();
|
this.enableUrlSync();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user