From 9053489ddd612c7002c7d226fba3c52b9a31e387 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 17 May 2024 18:51:23 +0200 Subject: [PATCH] 115046: Fixed url parameters not being filtered out of the url before hasChanges$ & isReinstatable$ is calculated --- .../abstract-item-update/abstract-item-update.component.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts b/src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts index 15ce7dbd53f..964405dfdda 100644 --- a/src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts +++ b/src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts @@ -85,12 +85,9 @@ export class AbstractItemUpdateComponent extends AbstractTrackableComponent impl } this.discardTimeOut = environment.item.edit.undoTimeout; - this.url = this.router.url; + this.url = this.router.url.split('?')[0]; this.hasChanges$ = this.hasChanges(); this.isReinstatable$ = this.isReinstatable(); - if (this.url.indexOf('?') > 0) { - this.url = this.url.substr(0, this.url.indexOf('?')); - } this.hasChanges().pipe(first()).subscribe((hasChanges) => { if (!hasChanges) { this.initializeOriginalFields();