From c2ce895bfe028ddee994ed3a8ee65b27e74255ac Mon Sep 17 00:00:00 2001 From: Glenn Thompson Date: Mon, 15 Dec 2025 00:02:17 +0300 Subject: [PATCH] Fix toggleCountryCities bug - use let* for sequential binding The arrow variable was referencing country-row before it was defined because let binds all variables simultaneously. Changed to let* for sequential binding so country-row is available when binding arrow. --- parenscript/admin.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parenscript/admin.lisp b/parenscript/admin.lisp index 77e2729..6c66296 100644 --- a/parenscript/admin.lisp +++ b/parenscript/admin.lisp @@ -983,9 +983,9 @@ ;; Toggle city display for a country (defun toggle-country-cities (country) - (let ((city-row (ps:chain document (get-element-by-id (+ "cities-" country)))) - (country-row (ps:chain document (query-selector (+ "tr[data-country=\"" country "\"]")))) - (arrow (when country-row (ps:chain country-row (query-selector ".expand-arrow"))))) + (let* ((city-row (ps:chain document (get-element-by-id (+ "cities-" country)))) + (country-row (ps:chain document (query-selector (+ "tr[data-country=\"" country "\"]")))) + (arrow (when country-row (ps:chain country-row (query-selector ".expand-arrow"))))) (if (ps:chain *expanded-countries* (has country)) (progn