From c07a9a118a53bb6da7b681ecb7436c5d632049ee Mon Sep 17 00:00:00 2001 From: Lauri Eskola Date: Thu, 13 Apr 2017 09:53:26 +0300 Subject: [PATCH 1/2] Replace usages of findIndex --- src/core/ObservableQuery.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ObservableQuery.ts b/src/core/ObservableQuery.ts index 97ee7f6f27f..2d6eafdaa67 100644 --- a/src/core/ObservableQuery.ts +++ b/src/core/ObservableQuery.ts @@ -434,7 +434,7 @@ export class ObservableQuery extends Observable> { const retQuerySubscription = { unsubscribe: () => { - if (this.observers.findIndex(el => el === observer) < 0 ) { + if (!this.observers.some(el => el === observer)) { // XXX can't unsubscribe if you've already unsubscribed... // for some reason unsubscribe gets called multiple times by some of the tests return; From 3d92f1faef371fd1936bb2ccc72b6f9ef0aca175 Mon Sep 17 00:00:00 2001 From: Lauri Eskola Date: Thu, 13 Apr 2017 18:28:56 +0300 Subject: [PATCH 2/2] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb32a4ba2ba..6991dd3b769 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Expect active development and potentially significant breaking changes in the `0.x` track. We'll try to be diligent about releasing a `1.0` version in a timely fashion (ideally within 3 to 6 months), to signal the start of a more stable API. ### vNEXT +- Fix: Remove usage of Array.findIndex (not supported by IE) [PR #1585](https://github.com/apollographql/apollo-client/pull/1585) ### 1.0.3 - Fix: Remove usage of String.endsWith (not supported by IE) [PR #1583](https://github.com/apollographql/apollo-client/pull/1583)