verify that the raw property we've got stored is actually a string - fixes #2078
This commit is contained in:
parent
aa8017ba45
commit
18e610820f
@ -144,7 +144,10 @@ export function _Literal(node) {
|
||||
// just use the raw property if our current value is equivalent to the one we got
|
||||
// when we populated raw
|
||||
if (node.raw != null && node.rawValue != null && val === node.rawValue) {
|
||||
return node.raw;
|
||||
// https://github.com/babel/babel/issues/2078
|
||||
if (node.raw[0] === "'" || node.raw[0] === '"') {
|
||||
return node.raw;
|
||||
}
|
||||
}
|
||||
|
||||
switch (typeof val) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user