Fixed #2631 - Changed initialState function declaration