Skip to content

Commit

Permalink
Merge pull request #23 from temp/fix-condition
Browse files Browse the repository at this point in the history
fix project filter condition, ad project null check for web_url
  • Loading branch information
timoschwarzer committed Jul 26, 2018
2 parents 9ebd471 + 28c9d54 commit 689ff78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/app.vue
Expand Up @@ -93,9 +93,9 @@
(maxAge === 0 || ((new Date() - new Date(project.last_activity_at)) / 1000 / 60 / 60 <= maxAge)) &&
(
(includeGroups[0] === '' && includeProjects[0] === '' && includePaths[0] === '') ||
(includePaths.some((path) => project.path_with_namespace.startsWith(path))) ||
(includeGroups.some((group) => group === project.namespace.name)) ||
(includeProjects.some((group) => group === project.name_with_namespace))
(includePaths[0] !== '' && includePaths.some((path) => project.path_with_namespace.startsWith(path))) ||
(includeGroups[0] !== '' && includeGroups.some((group) => group === project.namespace.name)) ||
(includeProjects[0] !== '' && includeProjects.some((group) => group === project.name_with_namespace))
);
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/project-card.vue
Expand Up @@ -2,7 +2,7 @@
<div v-if="showPipelinesOnly ? (pipelines !== null && pipelines.length > 0) : true" :class="['project-card', status]">
<div class="content">
<div class="title small">{{ project !== null ? project.namespace.name : '...' }} /</div>
<a class="title" target="_blank" rel="noopener noreferrer" :href="project.web_url">
<a class="title" target="_blank" rel="noopener noreferrer" :href="project !== null ? project.web_url : '#'">
{{ project !== null ? project.name : 'Loading project...' }}
</a>
<div class="pipeline-container">
Expand Down

0 comments on commit 689ff78

Please sign in to comment.