Skip to content

Commit 4bd3563

Browse files
committed
fixing another cycle
1 parent cde70d2 commit 4bd3563

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

packages/@ember/-internals/metal/lib/array.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ interface ObservedObject {
1212
_revalidate?: () => void;
1313
}
1414

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';
2216

2317
// Ideally, we'd use MutableArray.detect but for unknown reasons this causes
2418
// the node tests to fail strangely.

packages/@ember/-internals/metal/lib/chain-tags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
updateTag,
1111
validateTag,
1212
} from '@glimmer/validator';
13-
import { objectAt } from './array';
13+
import { objectAt } from './object-at';
1414
import { tagForProperty } from './tags';
1515

1616
export const CHAIN_PASS_THROUGH = new WeakSet();
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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+
}

0 commit comments

Comments
 (0)