Skip to content

Commit 95e3874

Browse files
committed
MC-3313: Banner/Slider: Image still show on PageBuilder stage after deleted
- Fixed Bug
1 parent 984e02e commit 95e3874

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/converter/style/background-image.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/converter/style/background-image.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ export default class BackgroundImage implements ConverterInterface {
4040
return "";
4141
}
4242
const imageUrl = value[0].url;
43+
const imageId = value[0].id;
4344
const mediaUrl = convertUrlToPathIfOtherUrlIsOnlyAPath(Config.getConfig("media_url"), imageUrl);
4445

4546
const mediaPath = imageUrl.split(mediaUrl);
46-
const directive = "{{media url=" + mediaPath[1] + "}}";
47+
const directive = "{{media url=" + mediaPath[1] + (imageId ? " id=" + imageId : "") + "}}";
4748
return "url(\'" + toDataUrl(directive) + "\')";
4849
}
4950
}

0 commit comments

Comments
 (0)