Skip to content

Commit

Permalink
Use nullish coalescing instea of logical or.
Browse files Browse the repository at this point in the history
  • Loading branch information
taeold authored Aug 23, 2024
1 parent d30cdfb commit df1f362
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/v2/providers/alerts/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export function getEndpointAnnotation(
eventFilters: {
alerttype: alertType,
},
retry: opts.retry || false,
retry: opts.retry ?? false,
},
};
if (appId) {
Expand Down
2 changes: 1 addition & 1 deletion src/v2/providers/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export function makeEndpoint(
eventType,
eventFilters,
eventFilterPathPatterns,
retry: opts.retry || false,
retry: opts.retry ?? false,
},
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/v2/providers/eventarc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export function onCustomEventPublished<T = any>(
eventTrigger: {
eventType: opts.eventType,
eventFilters: {},
retry: opts.retry || false,
retry: opts.retry ?? false,
channel,
},
};
Expand Down
2 changes: 1 addition & 1 deletion src/v2/providers/firestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ export function makeEndpoint(
eventType,
eventFilters,
eventFilterPathPatterns,
retry: opts.retry || false,
retry: opts.retry ?? false,
},
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/v2/providers/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export function onMessagePublished<T = any>(
eventTrigger: {
eventType: "google.cloud.pubsub.topic.v1.messagePublished",
eventFilters: { topic },
retry: opts.retry || false,
retry: opts.retry ?? false,
},
};
copyIfPresent(endpoint.eventTrigger, opts, "retry", "retry");
Expand Down
2 changes: 1 addition & 1 deletion src/v2/providers/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function onConfigUpdated(
eventTrigger: {
eventType,
eventFilters: {},
retry: optsOrHandler.retry || false,
retry: optsOrHandler.retry ?? false,
},
};
func.__endpoint = ep;
Expand Down
2 changes: 1 addition & 1 deletion src/v2/providers/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ export function onOperation(
eventTrigger: {
eventType,
eventFilters: { bucket },
retry: opts.retry || false,
retry: opts.retry ?? false,
},
};
copyIfPresent(endpoint.eventTrigger, opts, "retry", "retry");
Expand Down
2 changes: 1 addition & 1 deletion src/v2/providers/testLab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export function onTestMatrixCompleted(
eventTrigger: {
eventType,
eventFilters: {},
retry: optsOrHandler.retry || false,
retry: optsOrHandler.retry ?? false,
},
};
func.__endpoint = ep;
Expand Down

0 comments on commit df1f362

Please sign in to comment.