From 806ec495f0b194b221db95d1edf5bf7c22b3fe47 Mon Sep 17 00:00:00 2001 From: bruno Date: Fri, 10 Jul 2026 14:17:25 -0400 Subject: [PATCH] fix: add missing closing brace for toggleFavorite() method The toggleFavorite() function body was missing its closing }, causing togglePublish(){...} to be parsed inside toggleFavorite() body. The { at togglePublish() column was the 'Unexpected token {' SyntaxError that prevented ALL JavaScript from executing. Root cause of ALL Alpine 'is not defined' errors since the refactor. --- app/templates/page_editor.html | 1 + 1 file changed, 1 insertion(+) diff --git a/app/templates/page_editor.html b/app/templates/page_editor.html index b7555e7..53160ba 100644 --- a/app/templates/page_editor.html +++ b/app/templates/page_editor.html @@ -376,6 +376,7 @@ function editorState(){ const m=this.favorited?'DELETE':'POST'; fetch(`/board/api/favorites/${this.pid}`,{method:m,headers:{'X-CSRF-Token':csrf?csrf[1]:''}}) .then(r=>r.json()).then(()=>{this.favorited=!this.favorited;}).catch(()=>{}); + }, togglePublish(){this.pagePublished=!this.pagePublished;this.saveShare();}, saveShare(){ const csrf=document.cookie.match(/csrf_token=([^;]+)/);