refactored code
This commit is contained in:
@@ -28,7 +28,9 @@ export const LoadImage = (mapName) => {
|
||||
let background = document.querySelector('.bg-img')
|
||||
|
||||
img.onload = function() {
|
||||
if (background) {
|
||||
background.src = img.src
|
||||
}
|
||||
}
|
||||
|
||||
img.onerror = function () {
|
||||
|
Reference in New Issue
Block a user