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.
This commit is contained in:
parent
93140f8f24
commit
18c251c8c4
|
|
@ -983,7 +983,7 @@
|
||||||
|
|
||||||
;; Toggle city display for a country
|
;; Toggle city display for a country
|
||||||
(defun toggle-country-cities (country)
|
(defun toggle-country-cities (country)
|
||||||
(let ((city-row (ps:chain document (get-element-by-id (+ "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 "\"]"))))
|
(country-row (ps:chain document (query-selector (+ "tr[data-country=\"" country "\"]"))))
|
||||||
(arrow (when country-row (ps:chain country-row (query-selector ".expand-arrow")))))
|
(arrow (when country-row (ps:chain country-row (query-selector ".expand-arrow")))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue