Skip to content

fix(usePlaybackOptions): clear screen regions when screenRegions is unset#12

Open
andriiboliboksc wants to merge 5 commits into
Snapchat:mainfrom
andriiboliboksc:patch-1
Open

fix(usePlaybackOptions): clear screen regions when screenRegions is unset#12
andriiboliboksc wants to merge 5 commits into
Snapchat:mainfrom
andriiboliboksc:patch-1

Conversation

@andriiboliboksc

@andriiboliboksc andriiboliboksc commented Jul 9, 2026

Copy link
Copy Markdown

What changed

The screenRegions effect bails on any falsy value, so passing undefined never calls setScreenRegions and previously-set regions can't be cleared via the prop.

Drop the falsy guard and coalesce unset → {}. Since setScreenRegions is full-replacement (empty object clears all regions), the hook is now properly declarative: pass regions to set them, omit/undefined to clear.

@andriiboliboksc andriiboliboksc marked this pull request as ready for review July 9, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant