@accelerated-agency/visual-editor 0.6.1 → 0.6.2

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/vite.cjs CHANGED
@@ -2194,10 +2194,13 @@ function simulateExperiment() {
2194
2194
  variations[0];
2195
2195
  }
2196
2196
  var targetUrl =
2197
+ (test.metadata_1 && test.metadata_1.editor_url) ||
2197
2198
  (Array.isArray(test.urltargeting) && test.urltargeting[0]) ||
2198
2199
  test.pageUrl ||
2199
- (test.metadata_1 && test.metadata_1.editor_url) ||
2200
2200
  '';
2201
+ if (targetUrl && !/^https?:///i.test(String(targetUrl).trim())) {
2202
+ targetUrl = 'https://' + String(targetUrl).trim();
2203
+ }
2201
2204
  var testId = resolveSimulationId(test, ['iid', 'experimentIid', 'experimentId', '_id', 'id']);
2202
2205
  var variationId = resolveSimulationId(activeVariation, ['iid', 'platformIid', 'variationIid', '_id', 'id']);
2203
2206
  if (testId === null || !activeVariation || variationId === null) {
package/dist/vite.js CHANGED
@@ -2186,10 +2186,13 @@ function simulateExperiment() {
2186
2186
  variations[0];
2187
2187
  }
2188
2188
  var targetUrl =
2189
+ (test.metadata_1 && test.metadata_1.editor_url) ||
2189
2190
  (Array.isArray(test.urltargeting) && test.urltargeting[0]) ||
2190
2191
  test.pageUrl ||
2191
- (test.metadata_1 && test.metadata_1.editor_url) ||
2192
2192
  '';
2193
+ if (targetUrl && !/^https?:///i.test(String(targetUrl).trim())) {
2194
+ targetUrl = 'https://' + String(targetUrl).trim();
2195
+ }
2193
2196
  var testId = resolveSimulationId(test, ['iid', 'experimentIid', 'experimentId', '_id', 'id']);
2194
2197
  var variationId = resolveSimulationId(activeVariation, ['iid', 'platformIid', 'variationIid', '_id', 'id']);
2195
2198
  if (testId === null || !activeVariation || variationId === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accelerated-agency/visual-editor",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "private": false,
5
5
  "description": "Conversion visual editor as a reusable React package",
6
6
  "type": "module",