From 86681e2ddff3402fa89157d28eadccfbeb2e120c Mon Sep 17 00:00:00 2001 From: Lomirus Date: Tue, 18 Jan 2022 22:07:27 +0800 Subject: [PATCH] refactor: simplify the code (#91) --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index f85fde1..10cc9e0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ export { reactive } from '@vue/reactivity' import { createApp } from './app' -let s -if ((s = document.currentScript) && s.hasAttribute('init')) { +const s = document.currentScript +if (s && s.hasAttribute('init')) { createApp().mount() }