@plasmicpkgs/plasmic-cms 0.0.37 → 0.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1784,6 +1784,11 @@ function CmsQueryRepeater(_ref9) {
1784
1784
  databaseConfig: databaseConfig,
1785
1785
  params: params
1786
1786
  });
1787
+
1788
+ if (!table && tables && tables.length > 0) {
1789
+ table = tables[0].identifier;
1790
+ }
1791
+
1787
1792
  var maybeData = query.usePlasmicQueryData(cacheKey, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3() {
1788
1793
  return runtime_1.wrap(function _callee3$(_context3) {
1789
1794
  while (1) {
@@ -1802,30 +1807,22 @@ function CmsQueryRepeater(_ref9) {
1802
1807
  break;
1803
1808
  }
1804
1809
 
1805
- if (!(!tables || tables.length === 0)) {
1806
- _context3.next = 5;
1807
- break;
1808
- }
1809
-
1810
1810
  throw new Error("You must select a model to query");
1811
1811
 
1812
- case 5:
1813
- table = tables[0].identifier;
1814
-
1815
1812
  case 6:
1816
1813
  if (!(tables && !tables.find(function (t) {
1817
1814
  return t.identifier === table;
1818
1815
  }))) {
1819
- _context3.next = 8;
1816
+ _context3.next = 10;
1820
1817
  break;
1821
1818
  }
1822
1819
 
1823
1820
  throw new Error("There is no model called \"" + table + "\"");
1824
1821
 
1825
- case 8:
1822
+ case 10:
1826
1823
  return _context3.abrupt("return", mkApi(databaseConfig).query(table, params));
1827
1824
 
1828
- case 9:
1825
+ case 11:
1829
1826
  case "end":
1830
1827
  return _context3.stop();
1831
1828
  }