Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Fixes infinite error when result is null
Browse files Browse the repository at this point in the history
Note: I haven't tested it
  • Loading branch information
sanjo authored Jan 12, 2019
1 parent 0db6326 commit 3d6ef5a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/preloader/injected/EthereumProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@
var result = data.message;

// get the id which matches the returned id

This comment has been minimized.

Copy link
@tabathap

tabathap Nov 24, 2019

🤔

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;
});
Expand Down

1 comment on commit 3d6ef5a

@tabathap
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Please sign in to comment.