1
0
mirror of https://github.com/shadowfacts/type.git synced 2025-02-05 10:11:24 +00:00

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

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);
});
}
}