redo with larger than actual id is now possible
@@ -259,7 +259,7 @@ History.prototype = {
if ( cmd === undefined || id > cmd.id ) {
cmd = this.redo();
- while ( id > cmd.id ) {
+ while ( cmd !== undefined && id > cmd.id ) {