From 2b506d7df6c9e2e03726e034c85e9be8c1324a13 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 4 Jan 2022 17:09:13 +0800 Subject: [PATCH] chore: fix template exploerer boot with no storage --- packages/template-explorer/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/template-explorer/src/index.ts b/packages/template-explorer/src/index.ts index 1e8efdb9..5efe07eb 100644 --- a/packages/template-explorer/src/index.ts +++ b/packages/template-explorer/src/index.ts @@ -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)