Skip to content

Commit

Permalink
chore: remove duplicated logic in vanilla template (#10145)
Browse files Browse the repository at this point in the history
  • Loading branch information
curran authored Sep 22, 2022
1 parent 6eb374a commit f29fef5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/create-vite/template-vanilla-ts/src/counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export function setupCounter(element: HTMLButtonElement) {
counter = count
element.innerHTML = `count is ${counter}`
}
element.addEventListener('click', () => setCounter(++counter))
element.addEventListener('click', () => setCounter(counter + 1))
setCounter(0)
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-vanilla/counter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit f29fef5

Please sign in to comment.