Skip to content

Commit 32ed491

Browse files
committed
Add comment
1 parent 39d06a3 commit 32ed491

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/printValue.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ function getSrcFromAst(path: NodePath): string {
3535
*/
3636
export default function printValue(path: NodePath): string {
3737
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.
3841
if (path.node.type === 'Literal') {
3942
return `"${path.node.value}"`;
4043
}

0 commit comments

Comments
 (0)