wrappid / core

This is a Wrappid package repository that contains core functionalities of Wrappid Framework that enables users to use Wrappid's core features and components.
MIT License
10 stars 4 forks source link

fix: :bug: Made changes to to the auth state in DefaultAppBarContent.js #227

Closed chirag-uemk closed 1 month ago

chirag-uemk commented 1 month ago

returning an empty object when a state is not returned seems to fix the problem.

https://github.com/wrappid/core/issues/226

A solution to the issue was found in changing the following line in Line 32 of DefaultAppBarContent.js:

const auth = useSelector((state) => state.auth);

The code can be changed to :

const auth = useSelector((state) => state?.auth||{});

Returning an empty object when a state is not returned seems to fix the problem.