Skip to content

Commit 9720f06

Browse files
author
Annie Zhang
authored
remove nullish coalescing operator and optional chaining, to make compatible with Node 12 (#297)
1 parent d67c024 commit 9720f06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/table.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async function* accumulateQuery(queryRequest) {
8080
if (
8181
from.table === null ||
8282
select.columns === null ||
83-
select.columns?.length === 0
83+
(select.columns && select.columns.length === 0)
8484
)
8585
return;
8686
const columns = select.columns.map((c) => `t.${escaper(c)}`);
@@ -97,7 +97,7 @@ async function* accumulateQuery(queryRequest) {
9797
}
9898
if (slice.to !== null || slice.from !== null) {
9999
appendSql(
100-
`\nLIMIT ${slice.to !== null ? slice.to - (slice.from ?? 0) : 1e9}`,
100+
`\nLIMIT ${slice.to !== null ? slice.to - (slice.from || 0) : 1e9}`,
101101
args
102102
);
103103
}

0 commit comments

Comments
 (0)