Skip to content

Commit aedc2ea

Browse files
Fix : Wrong api call from defer load (#415)
* Fix : Wrong api call from defer load * fix: improve condition checks for assignment updates in defer load component --------- Co-authored-by: Siva Rama Krishna <[email protected]> Co-authored-by: tumms2021389 <[email protected]>
1 parent 8fdc5df commit aedc2ea

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/angular-sdk-components/src/lib/_components/infra/defer-load/defer-load.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
5858
// update itself (re-render)
5959
const theRequestedAssignment = this.pConn$.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENT_LABEL);
6060
const lastUpdateCaseTime = this.pConn$.getValue('caseInfo.lastUpdateTime');
61-
if (theRequestedAssignment !== this.currentLoadedAssignment || (lastUpdateCaseTime && lastUpdateCaseTime !== this.lastUpdateCaseTime)) {
61+
if (
62+
(theRequestedAssignment && theRequestedAssignment !== this.currentLoadedAssignment) ||
63+
(lastUpdateCaseTime && lastUpdateCaseTime !== this.lastUpdateCaseTime)
64+
) {
6265
this.currentLoadedAssignment = theRequestedAssignment;
6366
this.lastUpdateCaseTime = lastUpdateCaseTime;
6467
this.updateSelf();
@@ -155,6 +158,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges {
155158
console.error('Cannot load the defer loaded view without container information');
156159
}
157160
} else if (this.resourceType === this.PAGE) {
161+
if (!this.loadViewCaseID) return;
162+
158163
// Rendering defer loaded tabs in case/ page context
159164
this.pConn$
160165
.getActionsApi()

0 commit comments

Comments
 (0)