whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: check flagged_by is set before rendering
Date Mon, 13 Apr 2020 15:07:46 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 0c1de10  check flagged_by is set before rendering
0c1de10 is described below

commit 0c1de103ac9a1a4fc2a500e5e9aff3eae8ed7a05
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon Apr 13 11:07:19 2020 -0400

    check flagged_by is set before rendering
---
 www/board/agenda/views/pages/flagged.js.rb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/www/board/agenda/views/pages/flagged.js.rb b/www/board/agenda/views/pages/flagged.js.rb
index 8efa8bc..5ec9417 100644
--- a/www/board/agenda/views/pages/flagged.js.rb
+++ b/www/board/agenda/views/pages/flagged.js.rb
@@ -39,11 +39,13 @@ class Flagged < Vue
 
           _span.owner " [#{item.owner} / #{item.shepherd}]"
 
-          flagged_by = item.flagged_by.to_s.split(/,\s*/).map {|initials|
-            Server.directors[initials] || initials
-          }.join(', ')
+          if item.flagged_by
+            flagged_by = item.flagged_by.to_s.split(/,\s*/).map {|initials|
+              Server.directors[initials] || initials
+            }.join(', ')
 
-          _span.owner " flagged by: #{flagged_by}" if flagged_by
+            _span.owner " flagged by: #{flagged_by}"
+          end
         end
 
         _AdditionalInfo item: item, prefix: true


Mime
View raw message