From 3fabefb81b46531aeb62a7e637434c031e866e5c Mon Sep 17 00:00:00 2001 From: YikaJ <547179699@qq.com> Date: Wed, 15 Jan 2020 17:04:46 +0800 Subject: [PATCH] Update promise.js fn => func --- src/promise.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/promise.js b/src/promise.js index aa1e1c9..c28b5e0 100644 --- a/src/promise.js +++ b/src/promise.js @@ -11,7 +11,7 @@ function hasCallback(args) { } function _promisify(func) { - if (typeof func !== 'function') return fn + if (typeof func !== 'function') return func return (args = {}) => new Promise((resolve, reject) => { func( @@ -40,4 +40,4 @@ export function promisifyAll(wx = {}, wxp = {}) { }) } -export const promisify = _promisify \ No newline at end of file +export const promisify = _promisify