Fix navigator extra space issue (#981)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-02-09 16:06:53 +07:00 committed by GitHub
parent 18fe8b609b
commit a383b90430
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,10 +55,15 @@
specTopCount = topSpecials.length
bottomSpecials = await getSpecials(model.specials, 'bottom', spaces)
specBottomCount = bottomSpecials.length
} else {
topSpecials = []
bottomSpecials = []
specBottomCount = 0
specTopCount = 0
}
if (model.spaces) spModelCount = model.spaces.length
shownSpaces = spaces.filter(sp => !sp.archived)
showDivider = (specTopCount > 0 && specBottomCount + spModelCount > 0) ? true : false
showDivider = !!((specTopCount > 0 && specBottomCount + spModelCount > 0))
}
$: if (model) update(model, spaces)