Skip to content

Commit

Permalink
Making sure we are not applying a schema evolution when checking if w…
Browse files Browse the repository at this point in the history
…e need to update server (#838)
  • Loading branch information
travjenkins authored Nov 30, 2023
1 parent 8134852 commit fe4e9bb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hooks/useServerUpdateRequiredMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ const useServerUpdateRequiredMonitor = (draftSpecs: DraftSpecQuery[]) => {
binding[collectionNameProp]
);

// If the collection is no longer there then we are probably applying a schema evolution so we
// should not require server update as we just got back from the server
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!resourceConfig[collectionName]?.data) {
return false;
}

// Do a quick simple disabled check before comparing the entire object
if (
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
Expand Down

0 comments on commit fe4e9bb

Please sign in to comment.