mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Fix bug where a newly-created doc allows undo, which breaks it
Test Plan: Added a check to an existing test. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2665
This commit is contained in:
parent
ab01ce495d
commit
c042935c58
@ -413,7 +413,9 @@ export class ActiveDoc extends EventEmitter {
|
|||||||
* Adds a small table to start off a newly-created blank document.
|
* Adds a small table to start off a newly-created blank document.
|
||||||
*/
|
*/
|
||||||
public addInitialTable(docSession: OptDocSession) {
|
public addInitialTable(docSession: OptDocSession) {
|
||||||
return this._applyUserActions(docSession, [["AddEmptyTable"]]);
|
// Use a non-client-specific session, so that this action is not part of anyone's undo history.
|
||||||
|
const newDocSession = makeExceptionalDocSession('nascent');
|
||||||
|
return this._applyUserActions(newDocSession, [["AddEmptyTable"]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user