Skip to content

Commit

Permalink
Merge pull request #354 from cityofaustin/chia-fix-filters-wsod
Browse files Browse the repository at this point in the history
Prevent filter null failure when making new project
  • Loading branch information
chiaberry authored Jun 25, 2021
2 parents a8fbf0b + b78181a commit 7b2e3e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions moped-editor/src/views/projects/projectView/ProjectView.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ const ProjectView = () => {
const { projectId } = useParams();
let query = useQueryParams();
const classes = useStyles();
const previousFilters = useLocation().state.filters;
const allProjectsLink = previousFilters
const previousFilters = useLocation()?.state?.filters;
const allProjectsLink = !!previousFilters
? `/moped/projects?filter=${previousFilters}`
: "/moped/projects";


// Get the tab query string value and associated tab index.
// If there's no query string, default to first tab in TABS array
let activeTabIndex = !!query.get("tab")
Expand Down

0 comments on commit 7b2e3e5

Please sign in to comment.