File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
addon/components/collection-scroll-view Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { cached } from 'ember-cached-decorator-polyfill';
4
4
import { tracked } from '@glimmer/tracking' ;
5
5
import { action } from '@ember/object' ;
6
6
import { next , schedule } from '@ember/runloop' ;
7
+ import { assert as emberAssert } from '@ember/debug' ;
7
8
import { ref } from 'ember-ref-bucket' ;
8
9
9
10
/* A component which integrates a ScrollView with ember-collection */
@@ -128,6 +129,8 @@ export default class CollectionScrollView extends Component {
128
129
if ( itemIndex >= 0 ) {
129
130
let { y } = this . cellLayout . positionAt ( itemIndex ) ;
130
131
scrollViewApi . scrollTo ( y + this . headerHeight , true ) ;
132
+ } else {
133
+ emberAssert ( `item with ID ${ id } not found` , false ) ;
131
134
}
132
135
}
133
136
}
You can’t perform that action at this time.
0 commit comments