aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-08-04 12:01:13 +0800
committerGitHub <noreply@github.com>2017-08-04 12:01:13 +0800
commitc4cb371ce8ddad10d575b4ddb6cb85fe4689ca59 (patch)
tree7dfa4391e05630d04b1903b69f9ca2fff43715c7 /app
parentfea03ad82ef7bdf2b903922ec8b4a50453974b71 (diff)
parentd526f68c8e7d613ad79ec9383d6709651e5af77e (diff)
downloadtangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.gz
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.bz2
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.lz
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.xz
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.zst
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.zip
Merge pull request #1857 from MetaMask/hotFixCancleTx
fix cancelTransaction not receiving a callback
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/nodeify.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/scripts/lib/nodeify.js b/app/scripts/lib/nodeify.js
index 299bfe624..832d6c6d3 100644
--- a/app/scripts/lib/nodeify.js
+++ b/app/scripts/lib/nodeify.js
@@ -1,9 +1,10 @@
const promiseToCallback = require('promise-to-callback')
-module.exports = function(fn, context) {
+module.exports = function nodeify (fn, context) {
return function(){
const args = [].slice.call(arguments)
const callback = args.pop()
+ if (typeof callback !== 'function') throw new Error('callback is not a function')
promiseToCallback(fn.apply(context, args))(callback)
}
}