Closed coel closed 2 months ago
This update focuses on refining the handling and extraction of the orgCode
property from the organization
object in two JavaScript files. The changes ensure that the code robustly accesses properties, potentially avoiding runtime errors due to undefined objects and aligning with expected data structures.
File Path | Change Summary |
---|---|
src/frontend/.../KindeBrowserClient.js |
Updated access to orgCode to handle potentially undefined organization . |
src/handlers/setup.js |
Modified how organization property is structured in the export function. |
organization
object. The changes in this PR, which improve how orgCode
is accessed and structured, could potentially address the concerns raised about data structure expectations in the library.src/handlers/setup.js (1)
`60-62`: LGTM! Ensure that the integration with other parts of the application that consume this data is tested.
Explain your changes
Using
getOrganization()
fromuseKindeBrowserClient
returns organization as astring
instead of an object as specified in the types andgetOrganization()
fromgetKindeServerSession
.I.e.
returns currently
org_abc123
instead of{ orgCode: 'org_abc123' }
. Similarly,organization
returned fromuseKindeBrowserClient
doesn't match the type.Checklist
🛟 If you need help, consider asking for advice over in the Kinde community.
Summary by CodeRabbit