From 2921ac856cd094bc8561c50e0a91638dae014bb9 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 28 Aug 2013 10:03:40 -0600 Subject: [PATCH] Fall back to empty document if window state cannot be deserialized If the telepath serialization version has changed it will return null from Site::deserializeDocument. --- src/atom.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atom.coffee b/src/atom.coffee index 5c6073d78..82c9f41f8 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -231,7 +231,7 @@ window.atom = {site, document} = windowState ? {} if site? and document? window.site = telepath.Site.deserialize(site) - window.site.deserializeDocument(document) + window.site.deserializeDocument(document) ? window.site.createDocument({}) else window.site = new telepath.Site(1) window.site.createDocument({})