Skip to content

Commit a51c8e2

Browse files
committed
refactor: Swap .find() for .indexOf()
1 parent 8a45c30 commit a51c8e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debug/src/debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ export function initDebug() {
428428
);
429429
}
430430
} else if (type === 'a' || type === 'button') {
431-
if (getDomChildren(vnode).find(childType => childType === type)) {
431+
if (getDomChildren(vnode).indexOf(type) !== -1) {
432432
console.error(
433433
`Improper nesting of interactive content. Your <${type}>` +
434434
` should not have other ${type === 'a' ? 'anchor' : 'button'}` +

0 commit comments

Comments
 (0)