Skip to content

Commit f9b9b89

Browse files
committed
changed split-test
1 parent a648386 commit f9b9b89

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

dist/breinify-assets.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
image: 'image',
2424
url: 'url',
2525
iframe: 'iframe',
26-
html: 'html'
26+
html: 'html',
27+
untouched: 'untouched'
2728
},
2829
mappedResourceData: {
2930
settings: 'br-mapped-resource-data'
@@ -263,14 +264,15 @@
263264
_self._renderMappedResource($selectedEl, selectedType, foundMapId, cb);
264265
}
265266
};
267+
266268
if (type === this.marker.mappedResourceAutoDetectionType) {
267269
const headUrl = this._createUrl(mapId, {});
268270
$.ajax({
269271
url: headUrl,
270272
type: 'HEAD',
271273
success: function (data, textStatus, jqXHR) {
272274
let contentType = jqXHR.getResponseHeader('x-mapped-resource-content-type');
273-
contentType = typeof contentType === 'string' ? contentType.toLowerCase() : 'undefined';
275+
contentType = typeof contentType === 'string' ? contentType: 'UNDEFINED';
274276

275277
// determine the render-type (type) to be used for the contentType
276278
let selectedType;
@@ -284,6 +286,9 @@
284286
case 'URL':
285287
selectedType = _self.marker.mappedResourceType.iframe;
286288
break;
289+
default:
290+
selectedType = _self.marker.mappedResourceType.untouched;
291+
break;
287292
}
288293

289294
render($el, selectedType, mapId, callback);
@@ -412,6 +417,8 @@
412417
}
413418

414419
this._setUpElement($el, $newEl, resourceId, data, callback);
420+
} else if (foundType === this.marker.mappedResourceType.iframe) {
421+
this._setUpElement($el, $el, resourceId, data, callback);
415422
} else {
416423
callback(new Error('unsupported type: ' + type));
417424
}

0 commit comments

Comments
 (0)