@plasmicapp/loader-react 1.0.124 → 1.0.127

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.
@@ -2284,6 +2284,10 @@ var PlasmicComponentLoader = /*#__PURE__*/function () {
2284
2284
  return getActiveVariation;
2285
2285
  }();
2286
2286
 
2287
+ _proto2.getExternalVariation = function getExternalVariation(variation) {
2288
+ return loaderSplits.getExternalIds(this.getActiveSplits(), variation);
2289
+ };
2290
+
2287
2291
  _proto2.getActiveSplits = function getActiveSplits() {
2288
2292
  return this.__internal.getActiveSplits();
2289
2293
  };
@@ -2463,7 +2467,7 @@ function extractPlasmicQueryData(_x) {
2463
2467
 
2464
2468
  function _extractPlasmicQueryData() {
2465
2469
  _extractPlasmicQueryData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(element) {
2466
- var cache;
2470
+ var cache, queryCache;
2467
2471
  return runtime_1.wrap(function _callee$(_context) {
2468
2472
  while (1) {
2469
2473
  switch (_context.prev = _context.next) {
@@ -2485,18 +2489,27 @@ function _extractPlasmicQueryData() {
2485
2489
  console.warn("PLASMIC: Error encountered while pre-rendering", _context.t0);
2486
2490
 
2487
2491
  case 9:
2488
- return _context.abrupt("return", Object.fromEntries(Array.from(cache.entries()).filter(function (_ref3) {
2492
+ queryCache = Object.fromEntries(Array.from(cache.entries()).filter(function (_ref3) {
2489
2493
  var key = _ref3[0],
2490
2494
  val = _ref3[1];
2491
2495
  return !key.startsWith('$swr$') && val !== undefined;
2496
+ }));
2497
+ _context.prev = 10;
2498
+ return _context.abrupt("return", JSON.parse(JSON.stringify(queryCache, function (key, value) {
2499
+ return value !== undefined ? value : null;
2492
2500
  })));
2493
2501
 
2494
- case 10:
2502
+ case 14:
2503
+ _context.prev = 14;
2504
+ _context.t1 = _context["catch"](10);
2505
+ return _context.abrupt("return", queryCache);
2506
+
2507
+ case 17:
2495
2508
  case "end":
2496
2509
  return _context.stop();
2497
2510
  }
2498
2511
  }
2499
- }, _callee, null, [[1, 6]]);
2512
+ }, _callee, null, [[1, 6], [10, 14]]);
2500
2513
  }));
2501
2514
  return _extractPlasmicQueryData.apply(this, arguments);
2502
2515
  }