no need to normalize src on the frontend

This commit is contained in:
Amine Ben hammou
2017-10-17 12:57:39 +00:00
parent c79bf7d337
commit 60ed294302

View File

@@ -57,18 +57,7 @@ define([
ignoreFrom: '.mailpoet_image_resize_handle'
}
}),
normalizeSrc: function () {
var src = this.model.get('src');
if (src.startsWith('/')) { // if the link is relative
src = window.location.href
.split('/')
.slice(0, 3)
.join('/') + src;
this.model.set('src', src);
}
},
onRender: function () {
this.normalizeSrc();
this.toolsView = new Module.ImageBlockToolsView({ model: this.model });
this.showChildView('toolsRegion', this.toolsView);
if (this.model.get('fullWidth')) {