From 2a6a1dfd860bbfa5e29d458fd56e3c8ea0ee9d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Mon, 4 Jan 2016 17:56:27 +0100 Subject: [PATCH] Make neightbor section compatible with the new API spec --- app/coffee/modules/issues/detail.coffee | 4 ++-- app/coffee/modules/tasks/detail.coffee | 4 ++-- app/coffee/modules/userstories/detail.coffee | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/coffee/modules/issues/detail.coffee b/app/coffee/modules/issues/detail.coffee index 329e5244..22bcbe9e 100644 --- a/app/coffee/modules/issues/detail.coffee +++ b/app/coffee/modules/issues/detail.coffee @@ -127,14 +127,14 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin) @scope.issueId = issue.id @scope.commentModel = issue - if @scope.issue.neighbors.previous.ref? + if @scope.issue.neighbors.previous?.ref? ctx = { project: @scope.project.slug ref: @scope.issue.neighbors.previous.ref } @scope.previousUrl = @navUrls.resolve("project-issues-detail", ctx) - if @scope.issue.neighbors.next.ref? + if @scope.issue.neighbors.next?.ref? ctx = { project: @scope.project.slug ref: @scope.issue.neighbors.next.ref diff --git a/app/coffee/modules/tasks/detail.coffee b/app/coffee/modules/tasks/detail.coffee index 9a2ebc74..96bb59d7 100644 --- a/app/coffee/modules/tasks/detail.coffee +++ b/app/coffee/modules/tasks/detail.coffee @@ -115,14 +115,14 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin) @scope.taskId = task.id @scope.commentModel = task - if @scope.task.neighbors.previous.ref? + if @scope.task.neighbors.previous?.ref? ctx = { project: @scope.project.slug ref: @scope.task.neighbors.previous.ref } @scope.previousUrl = @navUrls.resolve("project-tasks-detail", ctx) - if @scope.task.neighbors.next.ref? + if @scope.task.neighbors.next?.ref? ctx = { project: @scope.project.slug ref: @scope.task.neighbors.next.ref diff --git a/app/coffee/modules/userstories/detail.coffee b/app/coffee/modules/userstories/detail.coffee index ec638afe..fb25ed57 100644 --- a/app/coffee/modules/userstories/detail.coffee +++ b/app/coffee/modules/userstories/detail.coffee @@ -152,14 +152,14 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin) @scope.usId = us.id @scope.commentModel = us - if @scope.us.neighbors.previous.ref? + if @scope.us.neighbors.previous?.ref? ctx = { project: @scope.project.slug ref: @scope.us.neighbors.previous.ref } @scope.previousUrl = @navUrls.resolve("project-userstories-detail", ctx) - if @scope.us.neighbors.next.ref? + if @scope.us.neighbors.next?.ref? ctx = { project: @scope.project.slug ref: @scope.us.neighbors.next.ref