Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed freezing browser when request a job by NaN id #5763

Merged
merged 3 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Tracks can be exported/imported to/from Datumaro and Sly Pointcloud formats (<ht
- Clean up disk space after a project is removed (<https://github.com/opencv/cvat/pull/5632>)
- Submit button is locked while file is not selected when importing a dataset (<https://github.com/opencv/cvat/pull/5757>)
- \[Server API\] Various errors in the generated schema (<https://github.com/opencv/cvat/pull/5575>)
- Fixed freezing browser when request a job by NaN id (<https://github.com/opencv/cvat/pull/5763>)
- SiamMask and TransT serverless functions (<https://github.com/opencv/cvat/pull/5658>)
- \[Server API\] Ability to rename label to an existing name (<https://github.com/opencv/cvat/pull/5662>)

Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.49.1",
"version": "1.49.2",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions cvat-ui/src/actions/annotation-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,10 @@ export function getJobAsync(
},
});

if (!Number.isInteger(tid) || !Number.isInteger(jid)) {
throw new Error('Requested resource id is not valid');
}

const loadJobEvent = await logger.log(
LogType.loadJob,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function mapStateToProps(state: CombinedState, own: OwnProps): StateToProps {
} = state;

return {
job: jobID === requestedId ? job : null,
job: jobID === requestedId || (Number.isNaN(jobID) && Number.isNaN(requestedId)) ? job : null,
fetching,
workspace,
frameNumber,
Expand Down