Skip to content

Commit 2118964

Browse files
committed
ACP2E-2267: The requested qty is not available message issues
- addressed static
1 parent 8e0a404 commit 2118964

File tree

1 file changed

+8
-8
lines changed
  • app/code/Magento/Theme/view/frontend/web/js/view

1 file changed

+8
-8
lines changed

app/code/Magento/Theme/view/frontend/web/js/view/messages.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ define([
5757
* @return {String}
5858
*/
5959
prepareMessageForHtml: function (message) {
60-
this.removeMessage(message);
60+
if (!_.isEmpty(this.messages().messages)) {
61+
this.removeMessage(message);
62+
}
6163

6264
return escaper.escapeHtml(message, this.allowedTags);
6365
},
@@ -68,16 +70,14 @@ define([
6870
* @param message
6971
*/
7072
removeMessage: function (message) {
71-
if (!_.isEmpty(this.messages().messages)) {
72-
let messages=[];
73+
let messages = [];
7374

74-
for (let i =0; i < this.messages().messages.length; i++) {
75-
if (this.messages().messages[i] !== message) {
76-
messages.push(this.messages().messages[i]);
77-
}
75+
for (let i =0; i < this.messages().messages.length; i++) {
76+
if (this.messages().messages[i] !== message) {
77+
messages.push(this.messages().messages[i]);
7878
}
79-
customerData.set('messages', messages);
8079
}
80+
customerData.set('messages', messages);
8181
}
8282
});
8383
});

0 commit comments

Comments
 (0)