Skip to content

Commit 92dc7f5

Browse files
committed
lib input-change-events: Avoid negative condition.
1 parent 5d21eb9 commit 92dc7f5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/input-change-events.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ const _ = {
3030
},
3131

3232
setupInputHandlers($el) {
33-
if (!$el.is(":input")) {
33+
if ($el.is(":input")) {
34+
// The element itself is an input, se we simply register a
35+
// handler fot it.
36+
_.registerHandlersForElement.bind($el)();
37+
} else {
3438
// We've been given an element that is not a form input. We
3539
// therefore assume that it's a container of form inputs and
3640
// register handlers for its children.
3741
$el.findInclusive(":input").each(_.registerHandlersForElement);
38-
} else {
39-
// The element itself is an input, se we simply register a
40-
// handler fot it.
41-
_.registerHandlersForElement.bind($el)();
4242
}
4343
},
4444

0 commit comments

Comments
 (0)