This repository was archived by the owner on Jan 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
api-editor/gui/src/features Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,17 @@ export class DoneFilter extends AbstractPythonFilter {
46
46
47
47
private getAnnotationsForTarget ( target : string , annotationStore : AnnotationStore ) : Annotation [ ] {
48
48
return Object . entries ( annotationStore ) . flatMap ( ( [ key , value ] ) => {
49
+ if ( typeof value !== 'object' ) {
50
+ return [ ] ;
51
+ }
52
+
49
53
if ( ! ( target in value ) ) {
50
54
return [ ] ;
51
55
}
52
56
53
- if ( key === 'calledAfters ' || key === 'groups ' ) {
57
+ if ( key === 'calledAfterAnnotations ' || key === 'groupAnnotations ' ) {
54
58
return Object . values ( value [ target ] ) ;
55
- } else if ( key === 'completes ' ) {
59
+ } else if ( key === 'completeAnnotations ' ) {
56
60
return [ ] ;
57
61
} else {
58
62
return [ value [ target ] ] ;
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ import { useLocation, useNavigate } from 'react-router-dom';
64
64
import { SelectionBreadcrumbs } from './SelectionBreadcrumbs' ;
65
65
import { HelpMenu } from './HelpMenu' ;
66
66
import { AnnotationStore } from '../annotations/versioning/AnnotationStoreV2' ;
67
- import { supportedAnnotationStoreSchemaVersions } from '../annotations/versioning/expectedVersions' ;
67
+ import { EXPECTED_ANNOTATION_STORE_SCHEMA_VERSION } from '../annotations/versioning/expectedVersions' ;
68
68
69
69
interface MenuBarProps {
70
70
displayInferErrors : ( errors : string [ ] ) => void ;
@@ -99,8 +99,7 @@ export const MenuBar: React.FC<MenuBarProps> = function ({ displayInferErrors })
99
99
JSON . stringify (
100
100
{
101
101
...annotationStore ,
102
- schemaVersion :
103
- supportedAnnotationStoreSchemaVersions [ supportedAnnotationStoreSchemaVersions . length - 1 ] ,
102
+ schemaVersion : EXPECTED_ANNOTATION_STORE_SCHEMA_VERSION ,
104
103
} ,
105
104
null ,
106
105
4 ,
You can’t perform that action at this time.
0 commit comments