Skip to content

Commit

Permalink
fix(edit-form): prevent type error by checking if listViewRouteName i…
Browse files Browse the repository at this point in the history
…s passed
  • Loading branch information
velrest committed Oct 14, 2020
1 parent a8c2f03 commit 09e03c5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions addon/components/edit-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ export default class EditFormComponent extends Component {
}

get relativeListViewRouteName() {
return (
this.args.listViewRouteName.split(".").slice(1).join(".") ||
`${this.relativeParentRouteName}.index`
);
if (this.args.listViewRouteName) {
return this.args.listViewRouteName.split(".").slice(1).join(".");
}

return `${this.relativeParentRouteName}.index`;
}

@task
Expand Down

0 comments on commit 09e03c5

Please sign in to comment.