]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix template exploerer boot with no storage
authorEvan You <yyx990803@gmail.com>
Tue, 4 Jan 2022 09:09:13 +0000 (17:09 +0800)
committerEvan You <yyx990803@gmail.com>
Tue, 4 Jan 2022 09:09:13 +0000 (17:09 +0800)
packages/template-explorer/src/index.ts

index 1e8efdb95d6f89300651c5722e19a560b95fd9b1..5efe07eb83e03a1058aeafb1b69894347c2ca824 100644 (file)
@@ -42,7 +42,9 @@ window.init = () => {
   )
   // functions are not persistable, so delete it in case we sometimes need
   // to debug with custom nodeTransforms
-  delete persistedState.options.nodeTransforms
+  if (persistedState.options) {
+    delete persistedState.options.nodeTransforms
+  }
 
   ssrMode.value = persistedState.ssr
   Object.assign(compilerOptions, persistedState.options)