Skip to content

Commit aea4ea7

Browse files
committed
Treat SelectClause.columns as optional
1 parent a6d3b27 commit aea4ea7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transform/stripTrailingCommas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const stripTrailingCommas = (cst: Program): Program => {
77
// Trailing comma is represented as an empty element at the end of column list
88
const removeLastEmptyColumn = cstVisitor({
99
select_clause: (node) => {
10-
if (isEmpty(last(node.columns.items))) {
10+
if (node.columns && isEmpty(last(node.columns.items))) {
1111
node.columns.items = node.columns.items.slice(0, -1);
1212
}
1313
},

0 commit comments

Comments
 (0)