Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Replace use of ?? with ||
  • Loading branch information
mattt committed Sep 11, 2024
commit 4bb5b2884b17c1c1b509b7ac709dcf1672d5edd1
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