File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/app-frontend/src/features/timeline/composable Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -129,17 +129,19 @@ export async function fetchLayers () {
129
129
}
130
130
131
131
export function getGroupsAroundPosition ( layer : Layer , startPosition : number , endPosition : number ) : EventGroup [ ] {
132
- const result : EventGroup [ ] = [ ]
132
+ const result = new Set < EventGroup > ( )
133
133
let key = Math . round ( startPosition / 100 )
134
134
const endKey = Math . round ( endPosition / 100 )
135
135
while ( key <= endKey ) {
136
136
const groups = layer . groupPositionCache [ key ]
137
137
if ( groups ) {
138
- result . push ( ...groups )
138
+ for ( const group of groups ) {
139
+ result . add ( group )
140
+ }
139
141
}
140
142
key ++
141
143
}
142
- return result
144
+ return Array . from ( result )
143
145
}
144
146
145
147
export function addGroupAroundPosition ( layer : Layer , group : EventGroup , newPosition : number ) {
You can’t perform that action at this time.
0 commit comments