Skip to content

Commit

Permalink
Fix a few crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Feb 3, 2024
1 parent 875088b commit 31e8d1c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions projects/budgetkey/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ export function app(): express.Express {
{ provide: APP_BASE_HREF, useValue: baseUrl },
{ provide: RESPONSE, useValue: res },
{ provide: REQUEST, useValue: req }
],
],
})
.then((html) => {
console.log(`${new Date().toISOString()} | ${res.statusCode} | OK | ${req.url} | ${user_agent}`);
return res.send(html);
if (html) {
return res.send(html);
}
return '';
})
.catch((err) => {
console.log(`${new Date().toISOString()} | ${res.statusCode} | ${err?.name || 'ERR'} | ${req.url} | ${user_agent}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h3>אופן רכישה:&nbsp;</h3><br/>
<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>
</div>

<div class='payments' *ngIf='paymentsTable'>
<div class='payments' *ngIf='paymentsTable && paymentsTable.length'>
<h3>דיווחים רבעוניים על תשלומים שבוצעו</h3>
<table>
<thead>
Expand All @@ -80,9 +80,9 @@ <h3>דיווחים רבעוניים על תשלומים שבוצעו</h3>
<td>
<ng-container *ngIf='row[period]'>
<a class='bk-tooltip-anchor'
[href]='row[period].url'
target='_blank'
*ngIf='row[period].url && row[period].diff != 0'>
[href]='row[period].url'
target='_blank'
*ngIf='row[period].url && row[period].diff != 0'>
<i class='glyphicon glyphicon-paperclip'></i>
<span class='bk-tooltip'>להורדת הדו"ח הרבעוני</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export class ItemContractComponent implements OnChanges, OnInit {
}

publisher() {
if (this.item['publisher']) {
if (this.item['purchasing_unit']) {
if (this.item['publisher']?.length) {
if (this.item['purchasing_unit']?.length) {
if (this.item['purchasing_unit'][0].indexOf(this.item['publisher'][0]) === -1) {
return this.item['publisher'][0] + ', ' + this.item['purchasing_unit'][0];
} else {
Expand Down

0 comments on commit 31e8d1c

Please sign in to comment.