src/common/js/winjs/js/ui.js
function (groupKey, itemKey, itemIndex) {
                    this._lastFocusedItemKey = itemKey;
                    this._lastFocusedItemIndex = itemIndex;
                    itemIndex = "" + itemIndex;
                    this._itemToIndex[itemKey] = itemIndex;
                    this._groupToItem[groupKey] = itemKey;
                }
function (groupKey, itemKey, itemIndex) {
                    this._lastFocusedItemKey = itemKey;
                    this._lastFocusedItemIndex = itemIndex;
                    itemIndex = "" + itemIndex;
                    this._itemToIndex[itemKey] = itemIndex;
                    this._groupToItem[groupKey] = itemKey;
                }
function ( groupKey , itemKey , itemIndex ) { this . _lastFocusedItemKey = itemKey ; this . _lastFocusedItemIndex = itemIndex ; itemIndex = "" + itemIndex ; this . _itemToIndex [ itemKey ] = itemIndex ; this . _groupToItem [ groupKey ] = itemKey ; }
We store indices as strings in the cache so index=0 does not evaluate to false as when we check for the existance of an index in the cache. The index is converted back into a number when calling getIndexForGroup
We store indices as strings in the cache so index = 0 does not evaluate to false as when we check for the existance of an index in the cache . The index is converted back into a number when calling getIndexForGroup