提交 d3c9c024 编写于 作者: 雪洛's avatar 雪洛

fix: createBLEConnection 无法进入回调的Bug

上级 2bccd8c6
......@@ -12,7 +12,9 @@ const SYNC_API_RE =
const CONTEXT_API_RE = /^create|Manager$/
const TASK_APIS = ['request', 'downloadFile', 'uploadFile', 'connectSocket']
const TASK_APIS = ['request', 'downloadFile', 'uploadFile', 'connectSocket']
const ASYNC_API = ['createBLEConnection']
const CALLBACK_API_RE = /^on/
......@@ -20,7 +22,7 @@ export function isContextApi (name) {
return CONTEXT_API_RE.test(name)
}
export function isSyncApi (name) {
return SYNC_API_RE.test(name)
return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1
}
export function isCallbackApi (name) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册