From 09944ede7f06b201537f2051c276a6f1917fc15c Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Wed, 15 Mar 2017 23:42:02 +0000
Subject: [PATCH] Fix for alerts being displayed as "[object Object]"

---
 index.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index a8071a1..72abd34 100644
--- a/index.js
+++ b/index.js
@@ -296,7 +296,7 @@
 		*/
 		
 		for(var i = 0, il = data.generalAlerts.length; i < il; i++) {
-			addParaWithText(times_alerts, data.generalAlerts[i]);
+			addParaWithText(times_alerts, data.generalAlerts[i].title);
 		}
 		
 		for(var i = 0, il = data.old.length; i < il; i++) {
@@ -375,7 +375,7 @@
 					times_alerts,
 					lang.line_alert_pattern
 						.replace('$line', data.routes[i].name)
-						.replace('$alert', data.routes[i].alerts[j])
+						.replace('$alert', data.routes[i].alerts[j].title)
 				);
 			}
 		}

--
Gitblit v1.9.1