mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Fix: openwrt widget handle null id in json rpc responses and cpu load representation (#3576)
This commit is contained in:
@@ -31,6 +31,10 @@ export async function sendJsonRpcRequest(url, method, params, username, password
|
||||
if (status === 200) {
|
||||
const json = JSON.parse(data.toString());
|
||||
|
||||
if (json.id === null) {
|
||||
json.id = 1;
|
||||
}
|
||||
|
||||
// in order to get access to the underlying error object in the JSON response
|
||||
// you must set `result` equal to undefined
|
||||
if (json.error && json.result === null) {
|
||||
|
||||
Reference in New Issue
Block a user