Commit c2e10867 authored by Coung Ngo's avatar Coung Ngo

Fix undefined error in project_templates_spec.rb

Add null check to fix error when variable is undefined
parent 94aeceba
...@@ -107,7 +107,9 @@ export default { ...@@ -107,7 +107,9 @@ export default {
this.groupToFilterBy = this.userGroups.find( this.groupToFilterBy = this.userGroups.find(
(group) => getIdFromGraphQLId(group.id) === groupId, (group) => getIdFromGraphQLId(group.id) === groupId,
); );
this.setNamespace(this.groupToFilterBy); if (this.groupToFilterBy) {
this.setNamespace(this.groupToFilterBy);
}
}, },
setNamespace({ id, fullPath }) { setNamespace({ id, fullPath }) {
this.selectedNamespace = { this.selectedNamespace = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment