Skip to content

Commit

Permalink
Small Fixes - Date and Init Errors (#1070)
Browse files Browse the repository at this point in the history
* needs more testing

* Added a little fix to prevent errors on startup
  • Loading branch information
ushahidlee committed May 21, 2024
1 parent d533db5 commit ec667d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class FilterControlComponent implements ControlValueAccessor, OnChanges,
}

const descendants = this.treeControl.dataNodes;
descendants.map((dataNode) => {
descendants?.map((dataNode) => {
if (changes['selectedFields'].currentValue.indexOf(dataNode.id) > -1) {
this.checklistSelection.select(dataNode);
} else {
Expand Down
5 changes: 4 additions & 1 deletion libs/sdk/src/lib/services/posts.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ export class PostsService extends ResourceService<any> {
postParams['source[]'] = postParams['source'];

// Allocate start and end dates, and remove originals
if (postParams.date?.start) {
if (params.date_before || params.date_after) {
postParams.date_before = params.date_before;
postParams.date_after = params.date_after;
} else if (postParams.date?.start) {
postParams.date_after = postParams.date.start;
if (postParams.date.end) {
postParams.date_before = postParams.date.end;
Expand Down

0 comments on commit ec667d9

Please sign in to comment.