Skip to content

Commit

Permalink
Use "||=" instead of "??=" for improved compatibility (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Dec 8, 2023
1 parent 01f1580 commit 765cadb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.3.33 (2023-12-8)

- Improve code compatibility with older versions of node.

## 0.3.32 (2023-09-30)

- Revert 0.3.31 changes.
Expand Down
2 changes: 1 addition & 1 deletion src/transformations/fix-import-directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function fixImportDirectives(withPeerProject?: boolean) {
const importFromPeer = getData(node).importFromPeer;
const importPath = importFromPeer ?? renamePath(imp.file);

imports[importPath] ??= [];
imports[importPath] ||= [];
imports[importPath].push(
[
importFromPeer === undefined ? renameContract(a.foreign.name) : a.foreign.name,
Expand Down

0 comments on commit 765cadb

Please sign in to comment.