mirror of
https://github.com/penpot/penpot.git
synced 2026-03-20 09:23:47 +00:00
Add a nil guard before subscribing to the stream in the use-stream hook. When a nil/undefined stream is passed (e.g., from a conditional expression or timing edge case during React rendering), the subscribe call on undefined causes a TypeError. The guard ensures we only subscribe when the stream is defined. Signed-off-by: Andrey Antukh <niwi@niwi.nz>