Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
89c6d398
Commit
89c6d398
authored
Mar 28, 2023
by
Alejandro Celaya
Committed by
Alejandro Celaya
Mar 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stream: make sure we fall back to empty string when query is not present
parent
e9f52392
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
StreamView.tsx
src/sidebar/components/StreamView.tsx
+1
-1
StreamView-test.js
src/sidebar/components/test/StreamView-test.js
+3
-0
No files found.
src/sidebar/components/StreamView.tsx
View file @
89c6d398
...
...
@@ -53,7 +53,7 @@ function StreamView({ api, toastMessenger }: StreamViewProps) {
// Sort the stream so that the newest annotations are at the top
store
.
setSortKey
(
'Newest'
);
store
.
clearAnnotations
();
loadAnnotations
(
currentQuery
).
catch
(
err
=>
{
loadAnnotations
(
currentQuery
??
''
).
catch
(
err
=>
{
toastMessenger
.
error
(
`Unable to fetch annotations:
${
err
.
message
}
`
);
});
},
[
currentQuery
,
loadAnnotations
,
store
,
toastMessenger
]);
...
...
src/sidebar/components/test/StreamView-test.js
View file @
89c6d398
...
...
@@ -97,6 +97,9 @@ describe('StreamView', () => {
'reply_2'
,
'reply_3'
,
]);
// Assert that we use an empty string as query, when the `q` param is not set
assert
.
calledWith
(
fakeSearchFilter
.
toObject
,
''
);
});
it
(
'displays an error if fetching annotations fails'
,
async
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment