Skip to content

Commit 6a84b9c

Browse files
committed
CU-8688ucrbp minor fix for angular change detection
1 parent 1f4175d commit 6a84b9c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

projects/ngx-resgrid-apps-shared/src/lib/services/utils.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,11 @@ export class UtilsService {
371371
token = 'ago',
372372
listChoice = 1;
373373

374-
if (seconds === 0) {
374+
// If it's within a minute of the current date lets just say "Just now" as it messes up Angular checking for changes
375+
if (seconds < 60 && seconds > -60) {
375376
return 'Just now';
376377
}
378+
377379
if (seconds < 0) {
378380
seconds = Math.abs(seconds);
379381
token = 'from now';

0 commit comments

Comments
 (0)