Skip to content

Commit 8af12fd

Browse files
committed
changed default to use image, null checks
1 parent 75075ce commit 8af12fd

File tree

7 files changed

+23
-7
lines changed

7 files changed

+23
-7
lines changed

src/components/template-pages/api-details-page/apiDetailsPageHandlers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export class ApiDetailsPageHandlers implements IWidgetHandler {
1111
return {
1212
colors: {
1313
titleBackgorundColor: {
14-
displayName: "Title background",
14+
displayName: "Static page title background",
1515
defaults: {
16-
value: "#3F4D50"
16+
value: "#155F9C"
1717
}
1818
}
1919
},

src/components/template-pages/api-details-page/ko/runtime/menu/api-nav-menu.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ export class ApiNavMenu {
131131
}
132132

133133
public selectMenuItem(menuItem: menuItem): void {
134+
if(!menuItem) {
135+
return;
136+
}
137+
134138
if (this.selectedMenuItem() === menuItem) {
135139
return;
136140
}

src/components/template-pages/api-details-page/ko/runtime/staticPages/api-products-cards.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@ export class ApiProductsCards {
4747
}
4848

4949
public async loadPageOfProducts(): Promise<void> {
50+
const apiName = this.selectedApiName();
51+
if (!apiName) {
52+
return;
53+
}
54+
5055
try {
5156
this.working(true);
52-
const apiName = this.selectedApiName();
5357
const pageOfProducts = await this.apiService.getApiProductsPage(apiName, {});
5458
this.products(pageOfProducts.value);
5559
this.nextLink(pageOfProducts.nextLink);

src/components/template-pages/product-details-page/ko/runtime/menu/product-nav-menu.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ export class ProductNavMenu {
6969
}
7070

7171
public selectMenuItem(menuItem: menuItem): void {
72+
if(!menuItem) {
73+
return;
74+
}
75+
7276
if (this.selectedMenuItem() === menuItem) {
7377
return;
7478
}

src/components/template-pages/product-details-page/ko/runtime/staticPages/product-apis-cards.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,13 @@ export class ProductApisCards {
4646
}
4747

4848
public async loadPageOfApis(): Promise<void> {
49+
const productName = this.selectedProductName();
50+
if (!productName) {
51+
return;
52+
}
53+
4954
try {
5055
this.working(true);
51-
const productName = this.selectedProductName();
5256
const pageOfApis = await this.apiService.getProductApis(`products/${productName}`, {});
5357
this.apis(pageOfApis.value);
5458
this.nextLink(pageOfApis.nextLink);

src/components/template-pages/product-details-page/productDetailsPageHandlers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export class ProductDetailsPageHandlers implements IWidgetHandler {
1111
return {
1212
colors: {
1313
titleBackgorundColor: {
14-
displayName: "Title background",
14+
displayName: "Static page title background",
1515
defaults: {
16-
value: "#3F4D50"
16+
value: "#155F9C"
1717
}
1818
}
1919
},

templates/default.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)