From 53c5740b543fc94fe628f545519083de7781fce6 Mon Sep 17 00:00:00 2001 From: shylinux Date: Mon, 13 Apr 2020 21:55:40 +0800 Subject: [PATCH] fix cb --- frame.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frame.js b/frame.js index ef7e06c8..fe23c305 100644 --- a/frame.js +++ b/frame.js @@ -274,7 +274,10 @@ var can = Volcanos("chat", { run: function(event, cmd, cb, silent) {var msg = can.Event(event); msg.Option("_action", item.name); - (input[item.cb] || can[item.cb] || can.Check)(event, event.target, cb); + + cb = typeof input[item.cb] == "function" && input[item.cb] + || typeof can[item.cb] == "function" && can[item.cb] || can.Check + cb(event, event.target, cb); }, }, Config.libs.concat(["plugin/"+type, "plugin/input/"+(item.figure||"")]), function(input) { var target = input.onimport.init(input, item, name, value, option);