@builder.io/sdk 6.0.0 → 6.0.1

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.
package/dist/index.cjs.js CHANGED
@@ -958,7 +958,7 @@ function toError(err) {
958
958
 
959
959
  var DEFAULT_API_VERSION = 'v3';
960
960
 
961
- var SDK_VERSION = '6.0.0';
961
+ var SDK_VERSION = '6.0.1';
962
962
 
963
963
  function datePlusMinutes(minutes) {
964
964
  if (minutes === void 0) { minutes = 30; }
@@ -2346,6 +2346,7 @@ var Builder = /** @class */ (function () {
2346
2346
  };
2347
2347
  Builder.prototype.flushGetContentQueue = function (usePastQueue, useQueue) {
2348
2348
  var _this = this;
2349
+ var _a;
2349
2350
  if (usePastQueue === void 0) { usePastQueue = false; }
2350
2351
  if (!this.apiKey) {
2351
2352
  throw new Error("Fetching content failed, expected apiKey to be defined instead got: ".concat(this.apiKey));
@@ -2471,8 +2472,8 @@ var Builder = /** @class */ (function () {
2471
2472
  'static',
2472
2473
  'includeRefs',
2473
2474
  ];
2474
- for (var _a = 0, properties_1 = properties; _a < properties_1.length; _a++) {
2475
- var key = properties_1[_a];
2475
+ for (var _b = 0, properties_1 = properties; _b < properties_1.length; _b++) {
2476
+ var key = properties_1[_b];
2476
2477
  var value = options[key];
2477
2478
  if (value !== undefined) {
2478
2479
  if (this.apiEndpoint === 'query') {
@@ -2486,7 +2487,7 @@ var Builder = /** @class */ (function () {
2486
2487
  }
2487
2488
  }
2488
2489
  }
2489
- if (this.preview) {
2490
+ if (this.preview && this.previewingModel === ((_a = queue === null || queue === void 0 ? void 0 : queue[0]) === null || _a === void 0 ? void 0 : _a.model)) {
2490
2491
  queryParams.preview = 'true';
2491
2492
  }
2492
2493
  var hasParams = Object.keys(queryParams).length > 0;