fix destructuring rest with template literal (#10013)
* fix destructuring rest with template literal * update test
This commit is contained in:
committed by
Nicolò Ribaudo
parent
a6392bd636
commit
b6486a22cb
@@ -203,6 +203,8 @@ export default declare((api, options) => {
|
||||
const key = prop.key;
|
||||
if (t.isIdentifier(key) && !prop.computed) {
|
||||
keys.push(t.stringLiteral(key.name));
|
||||
} else if (t.isTemplateLiteral(prop.key)) {
|
||||
keys.push(t.cloneNode(prop.key));
|
||||
} else if (t.isLiteral(key)) {
|
||||
keys.push(t.stringLiteral(String(key.value)));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user