fix(example): Header showing an empty option

This commit is contained in:
Braks
2021-08-08 23:05:10 +02:00
parent 3cd0693b93
commit 15f968c607

View File

@@ -16,11 +16,13 @@ const Header = defineComponent({
Revue Flow Dev
</a>
<select v-model={route.path} onChange={onChange}>
{routes.map((route) => (
<option value={route.path} key={route.path}>
{route.path === '/' ? 'basic' : route.path.substr(1, route.path.length)}
</option>
))}
{routes.map((route) =>
route.path !== '/' ? (
<option value={route.path} key={route.path}>
{route.path.substr(1, route.path.length)}
</option>
) : null
)}
</select>
</header>
);