File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,9 @@ Cubing.Scramblers.prototype = {
111
111
{
112
112
var callback = this . _commandIdToCallback [ e . data . commandId ] ;
113
113
delete this . _commandIdToCallback [ e . data . commandId ] ;
114
+ // TODO: Handle race conditions if the first attempt is done before the
115
+ // first scramble returns (possibly don't allow starting the timer without
116
+ // a valid scramble?).
114
117
callback ( e . data . scramble )
115
118
}
116
119
}
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ TimerApp.prototype = {
106
106
var dateString = today . getFullYear ( ) + "-" + ( today . getMonth ( ) + 1 ) + "-" + today . getDate ( ) ;
107
107
108
108
var serializationFormat = "v0.1" ;
109
- var result = "[" + serializationFormat + "][" + this . _currentEvent + "][" + new Date ( ) + "] " + ( time / 1000 ) + " (" + this . _currentScramble . scrambleString + ")" ;
109
+ var scrambleString = this . _currentScramble ? this . _currentScramble . scrambleString : "/* no scramble */" ;
110
+ var result = "[" + serializationFormat + "][" + this . _currentEvent + "][" + new Date ( ) + "] " + ( time / 1000 ) + " (" + scrambleString + ")" ;
110
111
111
112
var store = ( dateString in localStorage ) ? localStorage [ dateString ] + "\n" : "" ;
112
113
localStorage [ dateString ] = store + result ;
You can’t perform that action at this time.
0 commit comments