Skip to content

Commit

Permalink
Fix: Avoid nullish coalescing for Node 14
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhutchings committed Apr 28, 2023
1 parent 700f2ba commit 0df8fbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/utils/interpolate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default (values) => {

return values.reduce((stack, next, i) => {
if (isFinite(next) || i === values.length - 1) {
next ??= stack.at(-1)
next = next ?? stack.at(-1)

if (count > 0) {
const prev = stack.at(-1) ?? next
Expand Down
2 changes: 1 addition & 1 deletion src/templates/legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default ({
} = {}) => {
if (!data) return

includeDefs ??= includeWrap
includeDefs = includeDefs ?? includeWrap

const keys = Object.values(
data.flat().reduce((m, d) => {
Expand Down

0 comments on commit 0df8fbd

Please sign in to comment.