Skip to content

Commit 83cef40

Browse files
committed
Make terse typesafe
1 parent 6b81ffd commit 83cef40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/terse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const terseDir = async (dir: string) => {
1010

1111
const terseFile = async (file: string) => {
1212
if (extname(file) === '.js') {
13-
const { code: tersed } = minify( await readFile( file, 'utf-8' ) )
14-
await writeFile( file, tersed )
13+
const result = minify( await readFile( file, 'utf-8' ) )
14+
if (result.code) await writeFile( file, result.code )
1515
}
1616
}
1717

0 commit comments

Comments
 (0)