Skip to content

Commit

Permalink
Fix: other jsonrpc widgets broken in 0.9.8 (#3976)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon authored Sep 10, 2024
1 parent 52a4f1a commit 6b1080a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/proxy/handlers/jsonrpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export async function sendJsonRpcRequest(url, method, params, widget) {
accept: "application/json",
};

if (widget.username && widget.password) {
if (widget?.username && widget?.password) {
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
}

if (widget.key) {
if (widget?.key) {
headers.Authorization = `Bearer ${widget.key}`;
}

Expand Down

0 comments on commit 6b1080a

Please sign in to comment.