File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
packages/@ember/-internals/metal/lib Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,7 @@ interface ObservedObject {
12
12
_revalidate ?: ( ) => void ;
13
13
}
14
14
15
- export function objectAt < T > ( array : T [ ] | EmberArray < T > , index : number ) : T | undefined {
16
- if ( Array . isArray ( array ) ) {
17
- return array [ index ] ;
18
- } else {
19
- return array . objectAt ( index ) ;
20
- }
21
- }
15
+ export { objectAt } from './object-at' ;
22
16
23
17
// Ideally, we'd use MutableArray.detect but for unknown reasons this causes
24
18
// the node tests to fail strangely.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
10
10
updateTag ,
11
11
validateTag ,
12
12
} from '@glimmer/validator' ;
13
- import { objectAt } from './array ' ;
13
+ import { objectAt } from './object-at ' ;
14
14
import { tagForProperty } from './tags' ;
15
15
16
16
export const CHAIN_PASS_THROUGH = new WeakSet ( ) ;
Original file line number Diff line number Diff line change
1
+ import type EmberArray from '@ember/array' ;
2
+
3
+ export function objectAt < T > ( array : T [ ] | EmberArray < T > , index : number ) : T | undefined {
4
+ if ( Array . isArray ( array ) ) {
5
+ return array [ index ] ;
6
+ } else {
7
+ return array . objectAt ( index ) ;
8
+ }
9
+ }
You can’t perform that action at this time.
0 commit comments