Skip to content

Commit

Permalink
Fix header handling
Browse files Browse the repository at this point in the history
  • Loading branch information
j-a-n committed Jan 30, 2025
1 parent d0dcbb8 commit d9e726f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wallpanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class CameraMotionDetection {
}
}

const version = "4.35.2";
const version = "4.35.3";
const defaultConfig = {
enabled: false,
enabled_on_tabs: [],
Expand Down Expand Up @@ -2294,9 +2294,9 @@ class WallpanelView extends HuiView {
return url;
}

async loadMediaFromUrl(curElem, sourceUrl, mediaType = null, headers = {}) {
async loadMediaFromUrl(curElem, sourceUrl, mediaType = null, headers = null) {
const loadMediaWithElement = async (elem, url) => {
const response = await fetch(url, { headers: headers });
const response = await fetch(url, { headers: headers || {} });
if (!response.ok) {
logger.error(`Failed to load ${elem.tagName} "${url}"`, response);
throw new Error(`Failed to load ${elem.tagName} "${url}": ${response.status}`);
Expand Down

0 comments on commit d9e726f

Please sign in to comment.