Skip to content

Commit 8e0a404

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

File tree

1 file changed

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

1 file changed

+13
-2
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,27 @@ define([
5757
* @return {String}
5858
*/
5959
prepareMessageForHtml: function (message) {
60+
this.removeMessage(message);
61+
62+
return escaper.escapeHtml(message, this.allowedTags);
63+
},
64+
65+
/**
66+
* Remove provided message from message queue
67+
*
68+
* @param message
69+
*/
70+
removeMessage: function (message) {
6071
if (!_.isEmpty(this.messages().messages)) {
61-
let messages = [];
72+
let messages=[];
73+
6274
for (let i =0; i < this.messages().messages.length; i++) {
6375
if (this.messages().messages[i] !== message) {
6476
messages.push(this.messages().messages[i]);
6577
}
6678
}
6779
customerData.set('messages', messages);
6880
}
69-
return escaper.escapeHtml(message, this.allowedTags);
7081
}
7182
});
7283
});

0 commit comments

Comments
 (0)