Bug#9 - following when not logged in
Summary
Following a user when not logged in gives an error.
Steps to reproduce
If logged in, logout Follow any user
What is the current bug behavior?
Gives you Unhandled Rejection (TypeError): Cannot read property 'profile' of null
What is the expected correct behavior?
E.g. Popup saying "You need to login to follow this user."
Relevant logs and/or screenshots
(anonymous function)
src/app/src/reducers/profile.js:18
15 | return {};
16 | case FOLLOW_USER:
17 | case UNFOLLOW_USER:
> 18 | return {
19 | ...action.payload.profile
20 | };
21 | default:
View compiled
▶ 3 stack frames were collapsed.
(anonymous function)
src/app/src/middleware.js:60
57 | agent.setToken(null);
58 | }
59 |
> 60 | next(action);
61 | };
62 |
63 | function isPromise(v) {
View compiled
(anonymous function)
src/app/src/middleware.js:46
43 | return;
44 | }
45 |
> 46 | next(action);
47 | };
48 |
49 | const localStorageMiddleware = store => next => action => {
View compiled
▶ 2 stack frames were collapsed.
(anonymous function)
src/app/src/middleware.js:39
36 | if (!action.skipTracking) {
37 | store.dispatch({ type: ASYNC_END, promise: action.payload });
38 | }
> 39 | store.dispatch(action);
40 | }
41 | );
42 |
View compiled
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.