We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39d06a3 commit 32ed491Copy full SHA for 32ed491
src/utils/printValue.js
@@ -35,6 +35,9 @@ function getSrcFromAst(path: NodePath): string {
35
*/
36
export default function printValue(path: NodePath): string {
37
if (path.node.start == null) {
38
+ // This only happens when we use AST builders to create nodes that do not actually
39
+ // exist in the source (e.g. when resolving Object.keys()). We might need to enhance
40
+ // this if we start using builders from `ast-types` more.
41
if (path.node.type === 'Literal') {
42
return `"${path.node.value}"`;
43
}
0 commit comments