Skip to content

Commit

Permalink
fix: script attributes maybe falsy
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Sep 20, 2023
1 parent eae5cdd commit d9db386
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion playground/spa/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function App() {
<div className='App'>
<div>
<a href='https://vitejs.dev' target='_blank' rel='noreferrer'>
<img src='/vite.svg' className='logo' alt='Vite logo' />
<img src='/spa/vite.svg' className='logo' alt='Vite logo' />
</a>
<a href='https://reactjs.org' target='_blank' rel='noreferrer'>
<img src={reactLogo} className='logo react' alt='React logo' />
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export default function publicTypescript(options: VPPTPluginOptions = {}) {
acc += ` ${attr.name}="${cacheItem!.path}"`
return acc
}
acc += ` ${attr.name}="${attr.value}"`
acc += attr.value ? ` ${attr.name}="${attr.value}"` : ` ${attr.name}`
return acc
}, '')
.trim()
Expand Down

0 comments on commit d9db386

Please sign in to comment.