mirror of https://github.com/shadowfacts/type.git
Fix error when loading invalids from a never-saved file
This commit is contained in:
parent
9036a20ab4
commit
53b97f8dfb
5
main.js
5
main.js
|
@ -252,10 +252,9 @@ function save() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadInvalids(val) {
|
function loadInvalids(val) {
|
||||||
let serialized = val.invalids;
|
if (val && val.invalids) {
|
||||||
if (serialized) {
|
|
||||||
editor.operation(() => { // buffer all DOM changes together b/c performance
|
editor.operation(() => { // buffer all DOM changes together b/c performance
|
||||||
serialized.forEach(markInvalid);
|
val.invalids.forEach(markInvalid);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue