Skip to content

Commit

Permalink
Avoid logical assignment operator (#3022)
Browse files Browse the repository at this point in the history
Apparently `??=` was only added to javascript in ES12, and our eleweb build
doesn't support it.

Fixes breakage introduced in #3019.
  • Loading branch information
richvdh committed Jan 4, 2023
1 parent 9ac7165 commit 64119ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rust-crypto/rust-crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ export class RustCrypto implements CryptoBackend {
opts: IRequestOpts = {},
): Promise<string> {
// unbeknownst to HttpApi, we are sending JSON
opts.headers ??= {};
if (!opts.headers) opts.headers = {};
opts.headers["Content-Type"] = "application/json";

// we use the full prefix
opts.prefix ??= "";
if (!opts.prefix) opts.prefix = "";

const resp = await this.http.authedRequest(method, path, queryParams, body, opts);
return await resp.text();
Expand Down

0 comments on commit 64119ef

Please sign in to comment.