|
@@ -446,12 +446,12 @@ function fireKeyEvent(el, evtType, keyCode) {
|
|
|
_this.currentIndex = _this.currentIndex;
|
|
|
_this.className = _this.className;
|
|
|
|
|
|
- if((typeof init.rules[_this.className]["onPress"]) == "function")
|
|
|
+ if(init.rules[_this.className]&&(typeof init.rules[_this.className]["onPress"]) == "function")
|
|
|
init.rules[_this.className]["onPress"].call(_this);
|
|
|
else _this.onPress.call(_this);
|
|
|
if (e.keyCode == btnEnter){
|
|
|
|
|
|
- if((typeof init.rules[_this.className]["onEnterPress"]) == "function")
|
|
|
+ if(init.rules[_this.className]&&(typeof init.rules[_this.className]["onEnterPress"]) == "function")
|
|
|
init.rules[_this.className]["onEnterPress"].call(_this);
|
|
|
else _this.onEnterPress.call(_this);
|
|
|
}
|