mirror of
				https://github.com/reality/dbot.git
				synced 2025-11-04 07:37:32 +01:00 
			
		
		
		
	Prevent profile breaking if no stats are returned [Fix #81]
This commit is contained in:
		
							parent
							
								
									e798882420
								
							
						
					
					
						commit
						97b27e4d78
					
				@ -71,27 +71,28 @@ block content
 | 
			
		||||
                  th Verbosity
 | 
			
		||||
                  th Mentions
 | 
			
		||||
            tbody
 | 
			
		||||
              for chan, key in stats
 | 
			
		||||
                if stats.hasOwnProperty(key)
 | 
			
		||||
                    tr
 | 
			
		||||
                      td
 | 
			
		||||
                          a(href='/users/'+connection+'/'+encodeURIComponent(key))
 | 
			
		||||
                            #{key}
 | 
			
		||||
                          span 
 | 
			
		||||
                          if chan.online
 | 
			
		||||
                            if chan.active.active
 | 
			
		||||
                              span.label.label-success.tip(data-original-title="#{chan.active.ago}", data-placement="right") Active
 | 
			
		||||
                            else
 | 
			
		||||
                              span.label.label-important.tip(data-original-title="#{chan.active.ago}", data-placement="right") Inactive
 | 
			
		||||
                          else
 | 
			
		||||
                            span.label.tip(data-original-title="#{chan.active.ago}", data-placement="right") Offline
 | 
			
		||||
                      td
 | 
			
		||||
                          #{chan.fields.lines.data}
 | 
			
		||||
                      td
 | 
			
		||||
                          #{chan.fields.words.data}
 | 
			
		||||
                      td
 | 
			
		||||
                          #{chan.fields.lincent.data}
 | 
			
		||||
                      td
 | 
			
		||||
                          #{chan.fields.wpl.data}
 | 
			
		||||
                      td
 | 
			
		||||
                          #{chan.fields.in_mentions.data}
 | 
			
		||||
              if stats
 | 
			
		||||
                  for chan, key in stats
 | 
			
		||||
                    if stats.hasOwnProperty(key)
 | 
			
		||||
                        tr
 | 
			
		||||
                          td
 | 
			
		||||
                              a(href='/users/'+connection+'/'+encodeURIComponent(key))
 | 
			
		||||
                                #{key}
 | 
			
		||||
                              span 
 | 
			
		||||
                              if chan.online
 | 
			
		||||
                                if chan.active.active
 | 
			
		||||
                                  span.label.label-success.tip(data-original-title="#{chan.active.ago}", data-placement="right") Active
 | 
			
		||||
                                else
 | 
			
		||||
                                  span.label.label-important.tip(data-original-title="#{chan.active.ago}", data-placement="right") Inactive
 | 
			
		||||
                              else
 | 
			
		||||
                                span.label.tip(data-original-title="#{chan.active.ago}", data-placement="right") Offline
 | 
			
		||||
                          td
 | 
			
		||||
                              #{chan.fields.lines.data}
 | 
			
		||||
                          td
 | 
			
		||||
                              #{chan.fields.words.data}
 | 
			
		||||
                          td
 | 
			
		||||
                              #{chan.fields.lincent.data}
 | 
			
		||||
                          td
 | 
			
		||||
                              #{chan.fields.wpl.data}
 | 
			
		||||
                          td
 | 
			
		||||
                              #{chan.fields.in_mentions.data}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user