Commit c64b184d authored by Nick Stenning's avatar Nick Stenning

Only update stream filter when we have >0 URIs

The backend code in `h.streamer` assumes that the arguments to "one_of"
are either a non-empty list or a single value. Passing an empty list
causes the generation of a bogus query.

So, don't update the stream filter until we have at least one URI to
stream from.

Fixes #2257.
parent 10db14cd
...@@ -40,8 +40,9 @@ module.exports = class WidgetController ...@@ -40,8 +40,9 @@ module.exports = class WidgetController
loaded.push(f.uri) loaded.push(f.uri)
_loadAnnotationsFrom({uri: f.uri}, 0) _loadAnnotationsFrom({uri: f.uri}, 0)
streamFilter.resetFilter().addClause('/uri', 'one_of', loaded) if loaded.length > 0
streamer.send({filter: streamFilter.getFilter()}) streamFilter.resetFilter().addClause('/uri', 'one_of', loaded)
streamer.send({filter: streamFilter.getFilter()})
$scope.$watchCollection (-> crossframe.frames), loadAnnotations $scope.$watchCollection (-> crossframe.frames), loadAnnotations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment