Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rdjuric committed Jul 9, 2021
1 parent 05a3bed commit b353c8d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libs/Navigation/CustomActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ import lodashGet from 'lodash/get';
*
* @param {String} screenName
* @param {Object} params
* @param {Object} navigationRef
* @returns {Function}
*/
function pushDrawerRoute(screenName, params, navigationRef) {
return (state) => {


// Avoid the navigation and refocus the report if we're trying to navigate to our active report
// We use our RootState as the dispatch's state is relative to the active navigator and might
// not contain our active report.
const rootState = navigationRef.current.getRootState();
const activeReportID = lodashGet(rootState, 'routes[0].state.routes[0].params.reportID', '')
const activeReportID = lodashGet(rootState, 'routes[0].state.routes[0].params.reportID', '');

if (activeReportID === params.reportID) {
if (state.type !== 'drawer') {
Expand Down

0 comments on commit b353c8d

Please sign in to comment.