Skip to content

Commit 31e8d1c

Browse files
committed
Fix a few crashes
1 parent 875088b commit 31e8d1c

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

projects/budgetkey/server.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@ export function app(): express.Express {
5757
{ provide: APP_BASE_HREF, useValue: baseUrl },
5858
{ provide: RESPONSE, useValue: res },
5959
{ provide: REQUEST, useValue: req }
60-
],
60+
],
6161
})
6262
.then((html) => {
6363
console.log(`${new Date().toISOString()} | ${res.statusCode} | OK | ${req.url} | ${user_agent}`);
64-
return res.send(html);
64+
if (html) {
65+
return res.send(html);
66+
}
67+
return '';
6568
})
6669
.catch((err) => {
6770
console.log(`${new Date().toISOString()} | ${res.statusCode} | ${err?.name || 'ERR'} | ${req.url} | ${user_agent}`);

projects/budgetkey/src/app/item/items/item-procurement/item-contract/item-contract.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ <h3>אופן רכישה:&nbsp;</h3><br/>
5959
<span *ngIf='item.exemption_reason && item.exemption_reason.length && item.exemption_reason[0].length && item.exemption_reason[0].length > 5'>&nbsp;({{item.exemption_reason[0]}})</span>
6060
</div>
6161

62-
<div class='payments' *ngIf='paymentsTable'>
62+
<div class='payments' *ngIf='paymentsTable && paymentsTable.length'>
6363
<h3>דיווחים רבעוניים על תשלומים שבוצעו</h3>
6464
<table>
6565
<thead>
@@ -80,9 +80,9 @@ <h3>דיווחים רבעוניים על תשלומים שבוצעו</h3>
8080
<td>
8181
<ng-container *ngIf='row[period]'>
8282
<a class='bk-tooltip-anchor'
83-
[href]='row[period].url'
84-
target='_blank'
85-
*ngIf='row[period].url && row[period].diff != 0'>
83+
[href]='row[period].url'
84+
target='_blank'
85+
*ngIf='row[period].url && row[period].diff != 0'>
8686
<i class='glyphicon glyphicon-paperclip'></i>
8787
<span class='bk-tooltip'>להורדת הדו"ח הרבעוני</span>
8888
</a>

projects/budgetkey/src/app/item/items/item-procurement/item-contract/item-contract.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export class ItemContractComponent implements OnChanges, OnInit {
3434
}
3535

3636
publisher() {
37-
if (this.item['publisher']) {
38-
if (this.item['purchasing_unit']) {
37+
if (this.item['publisher']?.length) {
38+
if (this.item['purchasing_unit']?.length) {
3939
if (this.item['purchasing_unit'][0].indexOf(this.item['publisher'][0]) === -1) {
4040
return this.item['publisher'][0] + ', ' + this.item['purchasing_unit'][0];
4141
} else {

0 commit comments

Comments
 (0)