Fixed processing of null value in NodeUtils.clone() method

This commit is contained in:
sanex3339
2017-08-02 00:48:31 +03:00
parent 58f606bcd8
commit 5144b2b76a
8 changed files with 164 additions and 82 deletions
+4
View File
@@ -46,6 +46,10 @@ export class NodeUtils {
*/
public static clone <T extends ESTree.Node> (astTree: T): T {
const cloneRecursive: (node: T) => T = (node: T) => {
if (node === null) {
return node;
}
const copy: {[key: string]: any} = {};
Object