Don't messup compressor stack while optimizing Switch

Fix #59
This commit is contained in:
Mihai Bazon
2012-11-30 11:16:09 +02:00
parent f427e5efc7
commit 5cc90db7d0

View File

@@ -1430,7 +1430,7 @@ merge(Compressor.prototype, {
return node;
}
});
tt.stack = compressor.stack; // so that's able to see parent nodes
tt.stack = compressor.stack.slice(); // so that's able to see parent nodes
self = self.transform(tt);
} catch(ex) {
if (ex !== self) throw ex;