Skip to content

Commit

Permalink
refactor: Swap .find() for .indexOf()
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed May 9, 2024
1 parent 8a45c30 commit a51c8e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion debug/src/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export function initDebug() {
);
}
} else if (type === 'a' || type === 'button') {
if (getDomChildren(vnode).find(childType => childType === type)) {
if (getDomChildren(vnode).indexOf(type) !== -1) {
console.error(
`Improper nesting of interactive content. Your <${type}>` +
` should not have other ${type === 'a' ? 'anchor' : 'button'}` +
Expand Down

0 comments on commit a51c8e2

Please sign in to comment.