mirror of
https://github.com/SwingTheVine/Wplace-BlueMarble.git
synced 2026-04-19 17:32:03 +00:00
Fixed bug with Firefox crash...
...but the overlay is still broken! However, the broken parts won't kill wplace.
This commit is contained in:
parent
ca34eeeea8
commit
e1e9e9816e
2 changed files with 5 additions and 5 deletions
|
|
@ -65,7 +65,7 @@ export default class Overlay {
|
|||
this.overlay = element; // Declare it the highest overlay element
|
||||
this.currentParent = element;
|
||||
} else {
|
||||
this.currentParent.appendChild(element); // ...else delcare it the child of the last element
|
||||
this.currentParent?.appendChild(element); // ...else delcare it the child of the last element
|
||||
this.parentStack.push(this.currentParent);
|
||||
this.currentParent = element;
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ export default class Overlay {
|
|||
* // <div><p></p></div>
|
||||
*/
|
||||
buildOverlay(parent) {
|
||||
parent.appendChild(this.overlay);
|
||||
parent?.appendChild(this.overlay);
|
||||
|
||||
// Resets the class-bound variables of this class instance back to default so overlay can be build again later
|
||||
this.overlay = null;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ function inject(callback) {
|
|||
script.setAttribute('bm-name', name); // Passes in the name value
|
||||
script.setAttribute('bm-cStyle', consoleStyle); // Passes in the console style value
|
||||
script.textContent = `(${callback})();`;
|
||||
document.documentElement.appendChild(script);
|
||||
document.documentElement?.appendChild(script);
|
||||
script.remove();
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ stylesheetLink.onload = function () {
|
|||
this.onload = null;
|
||||
this.rel = 'stylesheet';
|
||||
};
|
||||
document.head.appendChild(stylesheetLink);
|
||||
document.head?.appendChild(stylesheetLink);
|
||||
|
||||
// CONSTRUCTORS
|
||||
const observers = new Observers(); // Constructs a new Observers object
|
||||
|
|
@ -226,7 +226,7 @@ function observeBlack() {
|
|||
// Attempts to find the "Paint Pixel" element for anchoring
|
||||
const paintPixel = black.parentNode.parentNode.parentNode.parentNode.querySelector('h2');
|
||||
|
||||
paintPixel.parentNode.appendChild(move); // Adds the move button
|
||||
paintPixel.parentNode?.appendChild(move); // Adds the move button
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue