cancelCommitBeingWorkedOn() {
        this.isWorkingOnCommit = false;
        let result = this.history[this.index];
        this._changes.send(result);
        this._latestActiveCommit.set(result);
        return result;
    }
Indicates that pending changes were discarded, so that a following 'undo' should return to the previous state
instead of the current state.
@returns {*} The new current state.