Skip to content

Commit

Permalink
Fix: elements not defined (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
KanTheAstronaut authored Aug 10, 2024
1 parent 334e948 commit 0f9245d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ let initializePromise;
let backgroundWorkerInstance;

async function initializeAsync() {
// Initialize elements
const elements = {
"#background": ProxyTarget.createProxy("element(#background)", globalThis.Element),
"#blazor-error-ui": ProxyTarget.createProxy("element(#blazor-error-ui)", globalThis.Element)
};
if (requireProxy) {
// Initialize elements
const elements = {
"#background": ProxyTarget.createProxy("element(#background)", globalThis.Element),
"#blazor-error-ui": ProxyTarget.createProxy("element(#blazor-error-ui)", globalThis.Element)
};
globalThis.document.querySelector = (selector) => {
if (!elements.hasOwnProperty(selector)) {
console.error("Unexpected selector " + selector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ let initializePromise;
let backgroundWorkerInstance;

async function initializeAsync() {
// Initialize elements
const elements = {
"#background": ProxyTarget.createProxy("element(#background)", globalThis.Element),
"#blazor-error-ui": ProxyTarget.createProxy("element(#blazor-error-ui)", globalThis.Element)
};
if (requireProxy) {
// Initialize elements
const elements = {
"#background": ProxyTarget.createProxy("element(#background)", globalThis.Element),
"#blazor-error-ui": ProxyTarget.createProxy("element(#blazor-error-ui)", globalThis.Element)
};
globalThis.document.querySelector = (selector) => {
if (!elements.hasOwnProperty(selector)) {
console.error("Unexpected selector " + selector);
Expand Down

0 comments on commit 0f9245d

Please sign in to comment.