mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 09:01:03 -08:00
fix(category-view): ensure itemId is a number for selection comparison
This commit is contained in:
1 parent
2c3c979a96
commit
74a65a53a9
1 file changed
+2
-5
@@ -25,12 +25,9 @@ export class CategoryViewComponent {
|
||||
|
||||
isSelected(item: XtreamCategory): boolean {
|
||||
const selectedCategory = this.selectedCategoryId();
|
||||
const itemId = (item as any).category_id ?? item.id;
|
||||
const itemId = Number((item as any).category_id ?? item.id);
|
||||
|
||||
return (
|
||||
selectedCategory !== null &&
|
||||
String(selectedCategory) === String(itemId)
|
||||
);
|
||||
return selectedCategory !== null && selectedCategory === itemId;
|
||||
}
|
||||
|
||||
getItemCount(item: XtreamCategory): number {
|
||||
|
||||
Reference in new issue
Block a user