@@ -223,7 +223,9 @@ export class Main extends React.Component {
223223 const { model, onChange } = this . props ;
224224 let { ticks } = object ;
225225 const correctResponse = tickUtils . snapElements ( model . graph . domain , ticks , model . correctResponse ) ;
226- const initialElements = tickUtils . snapElements ( model . graph . domain , ticks , model . graph . initialElements ) ;
226+ const initialElements = model . graph . initialElements
227+ ? tickUtils . snapElements ( model . graph . domain , ticks , model . graph . initialElements )
228+ : [ ] ;
227229 let updatedGraph = this . updateMajorValue ( { ...model . graph , ticks } ) ;
228230 const graph = { ...updatedGraph , initialElements } ;
229231 onChange ( { graph, correctResponse } ) ;
@@ -258,9 +260,9 @@ export class Main extends React.Component {
258260 ticks . minor < 1
259261 ? math . number ( math . ceil ( minorLimits . min ) )
260262 : ticks . minor >= math . number ( math . ceil ( minorLimits . min ) ) &&
261- ticks . minor <= math . number ( math . floor ( minorLimits . max ) )
262- ? ticks . minor
263- : math . number ( math . ceil ( minorLimits . min ) ) ;
263+ ticks . minor <= math . number ( math . floor ( minorLimits . max ) )
264+ ? ticks . minor
265+ : math . number ( math . ceil ( minorLimits . min ) ) ;
264266 ticks . integerTick = ticks . minor ;
265267 minorValues = { decimal : [ ] , fraction : [ ] } ;
266268 ticks . fractionTick = '0' ;
0 commit comments