RED-3800: fix undefined lastChange
This commit is contained in:
parent
b6e3046d21
commit
018a8c8d54
@ -12,7 +12,6 @@ import {
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import { ActivatedRoute, ActivatedRouteSnapshot, NavigationExtras, Router } from '@angular/router';
|
||||
import { Core } from '@pdftron/webviewer';
|
||||
import {
|
||||
AutoUnsubscribe,
|
||||
bool,
|
||||
@ -72,7 +71,6 @@ import { ConfigService } from '@services/config.service';
|
||||
import { ReadableRedactionsService } from '../pdf-viewer/services/readable-redactions.service';
|
||||
import { ROLES } from '@users/roles';
|
||||
import { SuggestionsService } from './services/suggestions.service';
|
||||
import Annotation = Core.Annotations.Annotation;
|
||||
|
||||
const textActions = [TextPopups.ADD_DICTIONARY, TextPopups.ADD_FALSE_POSITIVE];
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ export class FileDataService extends EntitiesService<AnnotationWrapper, Annotati
|
||||
const redactionLogCopy = JSON.parse(JSON.stringify(redactionLog));
|
||||
redactionLogCopy.redactionLogEntry = redactionLogCopy.redactionLogEntry.reduce((filtered, entry) => {
|
||||
const lastChange = entry.manualChanges.at(-1);
|
||||
const isRemoveChange = this.#isRemoveChange(lastChange.manualRedactionType);
|
||||
const isRemoveChange = this.#isRemoveChange(lastChange?.manualRedactionType);
|
||||
if (isRemoveChange) {
|
||||
entry.manualChanges.pop();
|
||||
filtered.push(entry);
|
||||
|
||||
@ -12,10 +12,10 @@ import Annotation = Core.Annotations.Annotation;
|
||||
|
||||
@Injectable()
|
||||
export class ReadableRedactionsService {
|
||||
readonly active$: Observable<boolean>;
|
||||
readonly #enableIcon = this._convertPath('/assets/icons/general/pdftron-action-enable-tooltips.svg');
|
||||
readonly #disableIcon = this._convertPath('/assets/icons/general/pdftron-action-disable-tooltips.svg');
|
||||
readonly #active$ = new BehaviorSubject<boolean>(true);
|
||||
readonly active$: Observable<boolean>;
|
||||
|
||||
constructor(
|
||||
@Inject(BASE_HREF_FN) private readonly _convertPath: BaseHrefFn,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user