The way I do that is to use a Component and set the target component based on whether the URL is available or not. This also prevents rendering an anchor tag without a target.
<Component
v-for="link in links"
:is="link.url ? Link : 'span'"
:href="link.url"
:class="{'class-if-url-does not exist': !link.url, 'class-if-url-exist': link.url}"
v-html="link.label"
/>
Quick tip: As the course is already quite old, follow the official documentation (instead of using the same commands Jeffrey uses) and read the comments below the episodes, as some things have changed. Some people point them out.