From ffbd6e07d45096f369953370ca695657ead567ca Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Wed, 1 Apr 2020 18:00:52 +0800 Subject: [PATCH] fix(runtime): Compatible with APIs starting with off #1511 --- src/core/helpers/promise.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/helpers/promise.js b/src/core/helpers/promise.js index 3f77edee..f36f5a54 100644 --- a/src/core/helpers/promise.js +++ b/src/core/helpers/promise.js @@ -16,7 +16,7 @@ const TASK_APIS = ['request', 'downloadFile', 'uploadFile', 'connectSocket'] const ASYNC_API = ['createBLEConnection'] -const CALLBACK_API_RE = /^on/ +const CALLBACK_API_RE = /^on|^off/ export function isContextApi (name) { return CONTEXT_API_RE.test(name) -- GitLab