Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Oct 07, 2021
  2. Oct 06, 2021
  3. Oct 05, 2021
  4. Oct 04, 2021
    • Dalton's avatar
    • Dalton's avatar
      Fix DataSelector infinite loop (#18228) · 651386bd
      Dalton authored
      When all the necessary data hasn't been fetched you can find yourself in
      stuck in a loop between the invalid state checks in DataSelector's
      componentDidUpdate method and the skipSteps method.
      
      1. there seems to always be a single schema (the "Everything Else"
         schema) available on instantiation
      2. the skipSteps method auto-selects this schema when no other schemas
         exist
      3. there's some pre-existing logic to avoid getting in this loop by
         checking the is_saved_questions property of the database in the
         selectedSchema. However, for whatever reason this property doesn't
         exist until AFTER we've fetched some things.
      
      The fix is checking a property that is guaranteed to exist, the ID for
      the "Everything Else" database
      Unverified
      651386bd
Loading