From 33aba8f31fbbbcda924d335804801fcbb4e13f0d Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Sun, 23 Jun 2019 18:13:53 -0500 Subject: [PATCH] Sentry fix: new items that were not in the previous set have new sort orders --- app/src/flux/models/query-subscription.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/flux/models/query-subscription.ts b/app/src/flux/models/query-subscription.ts index 45e3bb815..b892e91b5 100644 --- a/app/src/flux/models/query-subscription.ts +++ b/app/src/flux/models/query-subscription.ts @@ -171,6 +171,8 @@ export class QuerySubscription { }; _itemSortOrderHasChanged(old, updated) { + if (!old || !updated) return true; + for (const descriptor of this._query.orderSortDescriptors()) { const oldSortValue = old[descriptor.attr.modelKey]; const updatedSortValue = updated[descriptor.attr.modelKey];