Skip to content

Commit 445f2ab

Browse files
matttaron
authored andcommitted
Replace use of ?? with ||
1 parent 3380bbe commit 445f2ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class Replicate {
5959
options.userAgent || `replicate-javascript/${packageJSON.version}`;
6060
this.baseUrl = options.baseUrl || "https://api.replicate.com/v1";
6161
this.fetch = options.fetch || globalThis.fetch;
62-
this.fileEncodingStrategy = options.fileEncodingStrategy ?? "default";
63-
this.useFileOutput = options.useFileOutput ?? false;
62+
this.fileEncodingStrategy = options.fileEncodingStrategy || "default";
63+
this.useFileOutput = options.useFileOutput || false;
6464

6565
this.accounts = {
6666
current: accounts.current.bind(this),

lib/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ async function transformFileInputsToBase64EncodedDataURIs(inputs) {
318318
}
319319

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

323323
return `data:${mime};base64,${data}`;
324324
});

0 commit comments

Comments
 (0)