Fix error when loading invalids from a never-saved file

This commit is contained in:
Shadowfacts 2016-10-01 10:16:08 -04:00
parent 9036a20ab4
commit 53b97f8dfb
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 3 deletions

View File

@ -252,10 +252,9 @@ function save() {
}
function loadInvalids(val) {
let serialized = val.invalids;
if (serialized) {
if (val && val.invalids) {
editor.operation(() => { // buffer all DOM changes together b/c performance
serialized.forEach(markInvalid);
val.invalids.forEach(markInvalid);
});
}
}