Skip to content

Commit

Permalink
fixed eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
klakhov committed Jun 7, 2023
1 parent 2fb04fc commit 9d06efb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions cvat-core/src/frames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import { isBrowser, isNode } from 'browser-or-node';

import * as cvatData from 'cvat-data';
import jsonLogic from 'json-logic-js';
import { DimensionType } from 'enums';
import PluginRegistry from './plugins';
import serverProxy, { FramesMetaData } from './server-proxy';
Expand Down Expand Up @@ -318,20 +317,20 @@ FrameData.prototype.data.implementation = async function (onServerRequest) {

function getFrameMeta(jobID, frame): FramesMetaData['frames'][0] {
const { meta, mode, startFrame } = frameDataCache[jobID];
let frame_meta = null;
if (mode === 'interpolation' && meta.frames.length == 1) {
let frameMeta = null;
if (mode === 'interpolation' && meta.frames.length === 1) {
// video tasks have 1 frame info, but image tasks will have many infos
[frame_meta] = meta.frames;
} else if (mode === 'annotation' || mode === 'interpolation' && meta.frames.length > 1) {
[frameMeta] = meta.frames;
} else if ((mode === 'annotation' || mode === 'interpolation') && meta.frames.length > 1) {
if (frame > meta.stop_frame) {
throw new ArgumentError(`Meta information about frame ${frame} can't be received from the server`);
}
frame_meta = meta.frames[frame - startFrame];
frameMeta = meta.frames[frame - startFrame];
} else {
throw new DataError(`Invalid mode is specified ${mode}`);
}

return frame_meta;
return frameMeta;
}

class FrameBuffer {
Expand Down
2 changes: 1 addition & 1 deletion cvat-core/src/session-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function implementJob(Job) {
};

Job.prototype.issues.implementation = async function () {
const result = await serverProxy.issues.get({job_id: this.id });
const result = await serverProxy.issues.get({ job_id: this.id });
return result.map((issue) => new Issue(issue));
};

Expand Down

0 comments on commit 9d06efb

Please sign in to comment.