Christopher Johnson (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/206152

Change subject: returns null if there are no events in the sprint
......................................................................

returns null if there are no events in the sprint

Change-Id: Ie0a06ba65a2a85df923e1658e9103928ff100a44
---
M src/view/burndown/EventTableView.php
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint 
refs/changes/52/206152/1

diff --git a/src/view/burndown/EventTableView.php 
b/src/view/burndown/EventTableView.php
index c287ae2..d8cabdd 100644
--- a/src/view/burndown/EventTableView.php
+++ b/src/view/burndown/EventTableView.php
@@ -33,9 +33,13 @@
   }
 
   public function buildEventTable($start, $end) {
-    Javelin::initBehavior('events-table', array(
-    ), 'sprint');
     $rows = $this->buildEventsTree($start, $end);
+    if (empty($rows)) {
+      return null;
+    } else {
+      Javelin::initBehavior('events-table', array(
+      ), 'sprint');
+    }
     $table = id(new SprintTableView($rows))
         ->setHeaders(
             array(

-- 
To view, visit https://gerrit.wikimedia.org/r/206152
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0a06ba65a2a85df923e1658e9103928ff100a44
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/extensions/Sprint
Gerrit-Branch: master
Gerrit-Owner: Christopher Johnson (WMDE) <christopher.john...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to