From 3d6ef5a9e7d090c804100b499b8a9b4b145f3935 Mon Sep 17 00:00:00 2001 From: Jonas Aschenbrenner Date: Sat, 12 Jan 2019 18:46:24 +0100 Subject: [PATCH] Fixes infinite error when result is null Note: I haven't tested it --- modules/preloader/injected/EthereumProvider.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/preloader/injected/EthereumProvider.js b/modules/preloader/injected/EthereumProvider.js index c359a8ac0..1851ddeec 100644 --- a/modules/preloader/injected/EthereumProvider.js +++ b/modules/preloader/injected/EthereumProvider.js @@ -49,11 +49,7 @@ var result = data.message; // get the id which matches the returned id - if ( - typeof result === 'object' && - result.forEach && - isFinite(result.length) - ) { + if (Array.isArray(result)) { result.forEach(function(load) { if (_this.responseCallbacks[load.id]) id = load.id; });