Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 3824e40

Browse files
committed
fix(jqLite): properly detect unsupported calls for on()/off()
1 parent 953fa4c commit 3824e40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/jqLite.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ function JQLiteDealoc(element){
193193
}
194194
}
195195

196-
function JQLiteOff(element, type, fn, selector) {
197-
if (isDefined(selector)) throw jqLiteMinErr('off_args', 'jqLite#off() does not support the `selector` argument');
196+
function JQLiteOff(element, type, fn, unsupported) {
197+
if (isDefined(unsupported)) throw jqLiteMinErr('off_args', 'jqLite#off() does not support the `selector` argument');
198198

199199
var events = JQLiteExpandoStore(element, 'events'),
200200
handle = JQLiteExpandoStore(element, 'handle');
@@ -632,8 +632,8 @@ forEach({
632632

633633
dealoc: JQLiteDealoc,
634634

635-
on: function onFn(element, type, fn, other1){
636-
if ( isDefined(other1) ) throw jqLiteMinErr('on_args', 'jqLite#on() does not support the `selector` or `eventData` parameters');
635+
on: function onFn(element, type, fn, unsupported){
636+
if (isDefined(unsupported)) throw jqLiteMinErr('on_args', 'jqLite#on() does not support the `selector` or `eventData` parameters');
637637

638638
var events = JQLiteExpandoStore(element, 'events'),
639639
handle = JQLiteExpandoStore(element, 'handle');

0 commit comments

Comments
 (0)