🐛 Add project-id guard to use-plugin-register layout effect

Add `project-id` to the guard condition in `use-plugin-register`'s layout effect so the plugin "Try out" flow waits until projects have loaded.

Previously, only `plugin-url` was checked, which allowed the fetch to fire
before projects were available, sending a nil `project-id` and causing a 400
validation error from the backend.

AI-assisted-by: mimo-v2.5-pro
This commit is contained in:
Andrey Antukh 2026-07-27 13:01:02 +00:00
parent 319a2185c9
commit b90a37dd72

View File

@ -211,7 +211,7 @@
(mf/with-layout-effect
[plugin-url team-id project-id]
(when plugin-url
(when (and plugin-url project-id)
(->> (dp/fetch-manifest plugin-url)
(rx/subs!
(fn [plugin]