chore: remove unneeded assertion

This commit is contained in:
Daniel Roe 2024-11-29 13:54:21 +00:00
parent 2fd904d623
commit 4dc6b3993f
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B

View File

@ -160,8 +160,7 @@ export const RemovePluginMetadataPlugin = (nuxt: Nuxt) => createUnplugin(() => {
const propertyKey = property.key.name
if (propertyKey === 'order' || propertyKey === 'enforce' || propertyKey === 'name') {
const _nextNode = arg.properties[propertyIndex + 1] || node.arguments[argIndex + 1]
const nextNode = _nextNode as typeof _nextNode & { start: number, end: number }
const nextNode = arg.properties[propertyIndex + 1] || node.arguments[argIndex + 1]
const nextIndex = nextNode?.start || (arg.end - 1)
s.remove(property.start, nextIndex)