🐛 Fix num-linked-libraries to use select-libraries instead of all files

refs/select-libraries filters to only files that are libraries
of the current file (including itself), so (dec (count libraries))
now correctly returns the number of linked external libraries.

Closes #11106

AI-assisted-by: mimo-v2.5-pro
This commit is contained in:
Andrey Antukh 2026-08-06 08:18:52 +00:00
parent 9fded5c2eb
commit 03668f6819

View File

@ -276,7 +276,7 @@
(compute-stats [state]
(let [file (dsh/lookup-file state file-id)
file-data (:data file)
libraries (dsh/lookup-libraries state)
libraries (refs/select-libraries (:files state) file-id)
shapes (count-shapes-per-page file-data)
n-pages (count (:pages file-data))
n-shapes (reduce + 0 shapes)