Skip to content

Comments

Fix PermissionGate context provider bug#4

Merged
w01fgang merged 2 commits intomainfrom
claude/fix-permission-gate-bug-q1gUl
Dec 14, 2025
Merged

Fix PermissionGate context provider bug#4
w01fgang merged 2 commits intomainfrom
claude/fix-permission-gate-bug-q1gUl

Conversation

@w01fgang
Copy link
Owner

@w01fgang w01fgang commented Dec 14, 2025

The type definition didn't match the actual implementation.
This PR addresses it.

This fixes a TypeScript type error when passing multiple children,
arrays, or conditional rendering patterns (like `{condition && <Component />}`)
to PermissionGateProvider and PermissionGate components.

ReactChild only accepts ReactElement | string | number, but React
component children should accept the broader ReactNode type which
includes fragments, arrays, booleans, null, and undefined.

This also removes the deprecated `suppressImplicitAnyIndexErrors`
option from tsconfig.json that was removed in newer TypeScript versions.
@w01fgang w01fgang merged commit 2e4cda1 into main Dec 14, 2025
3 checks passed
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.

2 participants