Skip to content

Commit

Permalink
Replace use of ?? with ||
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt authored and aron committed Sep 12, 2024
1 parent 3380bbe commit 445f2ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class Replicate {
options.userAgent || `replicate-javascript/${packageJSON.version}`;
this.baseUrl = options.baseUrl || "https://api.replicate.com/v1";
this.fetch = options.fetch || globalThis.fetch;
this.fileEncodingStrategy = options.fileEncodingStrategy ?? "default";
this.useFileOutput = options.useFileOutput ?? false;
this.fileEncodingStrategy = options.fileEncodingStrategy || "default";
this.useFileOutput = options.useFileOutput || false;

this.accounts = {
current: accounts.current.bind(this),
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ async function transformFileInputsToBase64EncodedDataURIs(inputs) {
}

const data = bytesToBase64(buffer);
mime = mime ?? "application/octet-stream";
mime = mime || "application/octet-stream";

return `data:${mime};base64,${data}`;
});
Expand Down

0 comments on commit 445f2ab

Please sign in to comment.