Skip to content

Commit

Permalink
fix: wrong source getting (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon authored Nov 2, 2023
1 parent c37f6f0 commit 33ad8cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core-base/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1125,8 +1125,9 @@ function getSourceForCodeFrame(
source: string | ResourceNode
): string | undefined {
if (isString(source)) {
return source
} else {
if (source.loc?.source) {
if (source.loc && source.loc.source) {
return source.loc.source
}
}
Expand Down

0 comments on commit 33ad8cc

Please sign in to comment.