diff --git a/src/rust-crypto/rust-crypto.ts b/src/rust-crypto/rust-crypto.ts index c6ff569a816..7231899b52c 100644 --- a/src/rust-crypto/rust-crypto.ts +++ b/src/rust-crypto/rust-crypto.ts @@ -169,11 +169,11 @@ export class RustCrypto implements CryptoBackend { opts: IRequestOpts = {}, ): Promise { // 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();