From fcc8df31aca7e81d633213ca710acbd11bc13bea Mon Sep 17 00:00:00 2001 From: Qingrong Ke Date: Sat, 7 Dec 2019 15:25:09 +0800 Subject: [PATCH] Fix variable not defined error --- 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