Skip to content

Commit 017ea77

Browse files
authored
Merge pull request #338 from keerl/fix/v8-indexing-issue
fix(ios): v8 array indexing
2 parents dab807a + 9eeffe7 commit 017ea77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bottomnavigationbar/bottomnavigationbar.ios.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export class BottomNavigationBar extends BottomNavigationBarBase {
156156
// TODO: this is for he v8 runtime. Should not have to need this setTimeout(), find better way.
157157
this.selectTabNative(this.selectedTabIndex);
158158
setTimeout(() => {
159-
this.nativeViewProtected.selectedItem = this.nativeViewProtected.items[this.selectedTabIndex];
159+
this.nativeViewProtected.selectedItem = this.nativeViewProtected.items.objectAtIndex(this.selectedTabIndex);
160160
}, 0);
161161
}
162162

@@ -165,9 +165,9 @@ export class BottomNavigationBar extends BottomNavigationBarBase {
165165
return;
166166
}
167167
// ios impl does not trigger delegates!
168-
const itemToSelect = this.nativeViewProtected.items[index];
168+
const itemToSelect = this.nativeViewProtected.items.objectAtIndex(index);
169169
if (this._delegate.bottomNavigationBarShouldSelectItem(this.nativeViewProtected, itemToSelect)) {
170-
this.nativeViewProtected.selectedItem = this.nativeViewProtected.items[index];
170+
this.nativeViewProtected.selectedItem = this.nativeViewProtected.items.objectAtIndex(index);
171171
this._delegate.bottomNavigationBarDidSelectItem(this.nativeViewProtected, itemToSelect);
172172
this.selectedTabIndex = index;
173173
}

0 commit comments

Comments
 (0)