2015: live: Return nullStats when there is no such mount point.
authorDavid Thompson <dthompson2@worcester.edu>
Sat, 21 Mar 2015 01:06:12 +0000 (21:06 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Sat, 21 Mar 2015 01:06:53 +0000 (21:06 -0400)
2015/assets/js/stream.js

index 336fd3a7e720cebaaaa4a931cb674c876d5893f0..3edbdc06dbcd990fea0ba3c47b484c4caf4f480d 100644 (file)
@@ -48,6 +48,10 @@ app.streamStats = function(mount) {
     // Match the end of the listen URL for the mount point.
     var regexp = new RegExp(mount.concat('$'));
 
+    if(!data.icestats.source) {
+      return app.nullStats;
+    }
+
     // Due to <https://trac.xiph.org/ticket/2174>, we must
     // explicitly test if icestats.source is an array.
     if(!(data.icestats.source instanceof Array)) {