Skip to content

Commit

Permalink
fix: 没有传 template 时,会将 script 作为字符串输出
Browse files Browse the repository at this point in the history
  • Loading branch information
meixg committed Aug 16, 2021
1 parent 54bcb15 commit 336a1af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lib/compileSanToTs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function compileSanToTs(
const resCode = compileTypescript(scripts, filePath, {
tsFilePath,
context,
template: template || descriptor.script?.content || '',
template: template || descriptor.template?.content || '',
reportError,
});

Expand Down

0 comments on commit 336a1af

Please sign in to comment.