🆙 Fix the catalog search in some cases it will give a black screen

This commit is contained in:
duckietm
2026-04-01 17:12:09 +02:00
parent bfb56f0a4e
commit 6ad9a0c7b9
5 changed files with 37 additions and 30 deletions
+5 -1
View File
@@ -13,6 +13,8 @@ export const GetSubscriptionProductIcon = (id: number) =>
export const GetOfferNodes = (offerNodes: Map<number, ICatalogNode[]>, offerId: number) =>
{
if(!offerNodes) return [];
const nodes = offerNodes.get(offerId);
const allowedNodes: ICatalogNode[] = [];
@@ -20,7 +22,7 @@ export const GetOfferNodes = (offerNodes: Map<number, ICatalogNode[]>, offerId:
{
for(const node of nodes)
{
if(!node.isVisible) continue;
if(!node || !node.isVisible) continue;
allowedNodes.push(node);
}
@@ -31,6 +33,8 @@ export const GetOfferNodes = (offerNodes: Map<number, ICatalogNode[]>, offerId:
export const FilterCatalogNode = (search: string, furniLines: string[], node: ICatalogNode, nodes: ICatalogNode[]) =>
{
if(!node) return;
if(node.isVisible && (node.pageId > 0))
{
let nodeAdded = false;
+2 -2
View File
@@ -105,12 +105,12 @@ export class FurnitureOffer implements IPurchasableOffer
public get localizationName(): string
{
return this._furniData.name;
return this._furniData?.name ?? '';
}
public get localizationDescription(): string
{
return this._furniData.description;
return this._furniData?.description ?? '';
}
public get isLazy(): boolean