From 53b97f8dfb1291dcc56e892527bfc6c521f21f94 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 1 Oct 2016 10:16:08 -0400 Subject: [PATCH] Fix error when loading invalids from a never-saved file --- main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 849ae92..f7c5f9f 100644 --- a/main.js +++ b/main.js @@ -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); }); } }