fix error

This commit is contained in:
2020-10-19 20:14:26 +02:00
parent 69cfda17e8
commit d51caeb130
6 changed files with 85 additions and 77 deletions

View File

@@ -74,7 +74,10 @@ export default {
}
])
onMounted(() => {
if (!props.activeWindow.label) emit('set-window', windows.value[1])
const activeWindow = !props.activeWindow.label
? windows.value[1]
: windows.value.find((w) => w.label === props.activeWindow.label.replace('-', ' '))
emit('set-window', activeWindow)
})
return {
windows