fix(autojs): ui.emitter.emit() may make app crash if callback throws exception

add(sample): 界面模板一.js
This commit is contained in:
hyb1996
2018-06-03 11:57:49 +08:00
parent 35a5abed6a
commit 7036fa994e
4 changed files with 128 additions and 12 deletions

View File

@@ -20,6 +20,9 @@ bridges.call = function (func, target, args) {
*/
function wrap(value){
if(value == null || value == undefined){
return value;
}
if(!(typeof(value) == 'object' && value.getClass && util.isFunction(value.getClass))){
return value;
}