Skip to content

Commit b10e7d2

Browse files
committed
Merge branch 'MC-3513' into MC-1413
2 parents 0266c4b + 1767521 commit b10e7d2

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

app/code/Magento/PageBuilder/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,3 +285,4 @@ Add,Add
285285
"Elements","Elements"
286286
"Media","Media"
287287
"Add Content","Add Content"
288+
"No products were found matching your condition","No products were found matching your condition"

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/products/preview.js

Lines changed: 3 additions & 2 deletions
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/content-type/products/preview.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default class Preview extends BasePreview {
2323
public placeholderText: KnockoutObservable<string>;
2424
private messages = {
2525
EMPTY: $t("Empty Products"),
26+
NO_RESULTS: $t("No products were found matching your condition"),
2627
LOADING: $t("Loading..."),
2728
UNKNOWN_ERROR: $t("An unknown error occurred. Please try again."),
2829
};
@@ -66,6 +67,7 @@ export default class Preview extends BasePreview {
6667

6768
if ((typeof data.conditions_encoded !== "string") || data.conditions_encoded.length === 0) {
6869
this.placeholderText(this.messages.EMPTY);
70+
6971
return;
7072
}
7173

@@ -83,8 +85,8 @@ export default class Preview extends BasePreview {
8385

8486
$.ajax(url, requestConfig)
8587
.done((response) => {
86-
if (typeof response.data !== "object" || typeof response.data.content === "undefined") {
87-
this.placeholderText(this.messages.EMPTY);
88+
if (typeof response.data !== "object" || !Boolean(response.data.content)) {
89+
this.placeholderText(this.messages.NO_RESULTS);
8890

8991
return;
9092
}

0 commit comments

Comments
 (0)