Skip to content

Commit

Permalink
fix void layer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pakb committed Nov 10, 2023
1 parent d84ba8e commit a22469f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export default function (backgroundLayers, currentBackgroundLayer, emit) {
const show = ref(false)
const animate = ref(false)
function getImageForBackgroundLayer(backgroundLayer) {
return new URL(`../../../assets/${backgroundLayer.getID()}.png`, import.meta.url).href
let backgroundId = backgroundLayer?.getID()
if (!backgroundId) {
backgroundId = 'void'
}
return new URL(`../../../assets/${backgroundId}.png`, import.meta.url).href
}
function onSelectBackground(backgroundLayer) {
emit('selectBackground', backgroundLayer)
Expand Down

0 comments on commit a22469f

Please sign in to comment.