From 53e1234b77df14fc6d3cdf959b375d8b743084bb Mon Sep 17 00:00:00 2001 From: Curran Kelleher <68416+curran@users.noreply.github.com> Date: Fri, 16 Sep 2022 14:26:59 -0400 Subject: [PATCH] Remove duplicated logic in vanilla example --- packages/create-vite/template-vanilla/counter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-vite/template-vanilla/counter.js b/packages/create-vite/template-vanilla/counter.js index 12ae65abfaea09..881e2d7adf529f 100644 --- a/packages/create-vite/template-vanilla/counter.js +++ b/packages/create-vite/template-vanilla/counter.js @@ -4,6 +4,6 @@ export function setupCounter(element) { counter = count element.innerHTML = `count is ${counter}` } - element.addEventListener('click', () => setCounter(++counter)) + element.addEventListener('click', () => setCounter(counter + 1)) setCounter(0) }