Skip to content
This repository was archived by the owner on Jan 1, 2023. It is now read-only.

Commit 7176378

Browse files
authored
Merge pull request #19 from nd-02110114/fix-bug
🐛 (src) fix bug
2 parents 6734498 + b42ee81 commit 7176378

File tree

2 files changed

+216
-167
lines changed

2 files changed

+216
-167
lines changed

src/visitors/object_expression.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ export function ObjectExpression(path: NodePath<ObjectExpression>) {
1111
const escapedJson = json.replace(/'/g, "\\'")
1212
path.replaceWithSourceString(`JSON.parse('${escapedJson}')`)
1313
} catch (e) {
14-
const { loc } = path.parent
15-
const line = loc && loc.start.line
16-
console.error(
17-
`At ${line} line (start) : The object wasn't converted (${e.message})`
18-
)
14+
// disable error message
15+
// const { loc } = path.parent
16+
// const line = loc && loc.start.line
17+
// console.error(
18+
// `At ${line} line (start) : The object wasn't converted (${e.message})`
19+
// )
1920
}
2021
}

0 commit comments

Comments
 (0)