Skip to content

Commit

Permalink
Issue #417: Should not return empty string so that it is compatible w…
Browse files Browse the repository at this point in the history
…ith babel (#428)
  • Loading branch information
lptai committed May 2, 2022
1 parent 89586a0 commit e2c7a56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/vue2-jest/lib/transformers/typescript.js
Expand Up @@ -21,8 +21,7 @@ module.exports = scriptLang => ({

res.outputText = stripInlineSourceMap(res.outputText)

const inputSourceMap =
res.sourceMapText !== undefined ? JSON.parse(res.sourceMapText) : ''
const inputSourceMap = res.sourceMapText && JSON.parse(res.sourceMapText)

const customTransformer =
getCustomTransformer(vueJestConfig['transform'], 'js') || {}
Expand Down
3 changes: 1 addition & 2 deletions packages/vue3-jest/lib/transformers/typescript.js
Expand Up @@ -21,8 +21,7 @@ module.exports = {

res.outputText = stripInlineSourceMap(res.outputText)

const inputSourceMap =
res.sourceMapText !== undefined ? JSON.parse(res.sourceMapText) : ''
const inputSourceMap = res.sourceMapText && JSON.parse(res.sourceMapText)

const customTransformer =
getCustomTransformer(vueJestConfig['transform'], 'js') || {}
Expand Down

0 comments on commit e2c7a56

Please sign in to comment.