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,6 +40,7 @@ module.exports = class WidgetController ...@@ -40,6 +40,7 @@ module.exports = class WidgetController
loaded.push(f.uri) loaded.push(f.uri)
_loadAnnotationsFrom({uri: f.uri}, 0) _loadAnnotationsFrom({uri: f.uri}, 0)
if loaded.length > 0
streamFilter.resetFilter().addClause('/uri', 'one_of', loaded) streamFilter.resetFilter().addClause('/uri', 'one_of', loaded)
streamer.send({filter: streamFilter.getFilter()}) streamer.send({filter: streamFilter.getFilter()})
......
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