File tree Expand file tree Collapse file tree
view/frontend/templates/script/store Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ use Magento\Framework\View\Element\Template;
1111 messages: [],
1212 init() {
1313 Alpine.effect(() => {
14- const storeData = Alpine.store('LokiLocalStorage').data ;
15- if (storeData && storeData.messages && storeData.messages .messages) {
16- this.messages = [...this.messages, ...storeData.messages .messages];
14+ const messageSection = Alpine.store('LokiLocalStorage').get('messages') ;
15+ if (messageSection && messageSection .messages) {
16+ this.messages = [...this.messages, ...messageSection .messages];
1717 this.getStore().set('messages', {messages: []});
1818 }
1919 });
@@ -54,11 +54,11 @@ use Magento\Framework\View\Element\Template;
5454 this.getStore().remove('messages');
5555 },
5656 getMessagesFromStore() {
57- const messagesSection = this.getStore().data. messages;
57+ const messagesSection = this.getStore().get(' messages') ;
5858 return messagesSection && messagesSection.messages ? messagesSection.messages : [];
5959 },
6060 setMessageInStore(messages) {
61- const messagesSection = this.getStore().data. messages;
61+ const messagesSection = this.getStore().get(' messages') ;
6262 messagesSection.messages = messages;
6363 this.getStore().set('messages', messagesSection);
6464 },
You can’t perform that action at this time.
0 commit comments