Skip to content

Commit

Permalink
fix: unexpected constant nullishness on the left-hand side of a ??
Browse files Browse the repository at this point in the history
…expression
  • Loading branch information
Badisi committed Sep 9, 2024
1 parent 7af97fa commit 0303bd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/lib/src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const createOrUpdateFile = (filePath: string, data: unknown): Rule =>
*/
export const downloadFile = (source: string | URL, destination: string, replace = false, retries = 3, backoff = 300): Rule =>
async (tree: Tree): Promise<void> => {
if (!tree.exists(destination) ?? replace) {
if (!tree.exists(destination) || replace) {
const data = await getDataFromUrl(source, retries, backoff);
if (!tree.exists(destination)) {
tree.create(destination, data);
Expand Down

0 comments on commit 0303bd9

Please sign in to comment.