File tree Expand file tree Collapse file tree
view/base/templates/script/store Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ $fetchCookies = !(bool)$block->getSkipCookies();
2424 fetchCookies: <?= /* @noEscape */ $ fetchLocalStorage ? 'true ' : 'false ' ?> ,
2525 init() {
2626 if (this.fetchLocalStorage) {
27- Alpine.effect(() => {
28- const messageSection = Alpine.store('LocalStorage').get('messages');
27+ Alpine.effect(async () => {
28+ const messageSection = await Alpine.store('LocalStorage').get('messages');
2929 if (messageSection && messageSection.messages) {
3030 this.messages = [...this.messages, ...messageSection.messages];
3131 this.reset();
@@ -86,8 +86,8 @@ $fetchCookies = !(bool)$block->getSkipCookies();
8686 messages: []
8787 });
8888 },
89- getMessagesFromStore() {
90- const messagesSection = this.getStore().get('messages');
89+ async getMessagesFromStore() {
90+ const messagesSection = await this.getStore().get('messages');
9191 return messagesSection && messagesSection.messages ? messagesSection.messages : [];
9292 },
9393 setMessageInStore(messages) {
You can’t perform that action at this time.
0 commit comments