X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fguards%2Fcan-deactivate-guard.service.ts;h=c3b5f37f84057d32920afd5c807c8bb1f604353d;hb=1f30a1853e38c20a45722dbd6d38aaaec63839e8;hp=15618f6990a41d1836cc28738476880d1f300516;hpb=78967fca4cacbc247fa6fb62d64b2d6825a10804;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/guards/can-deactivate-guard.service.ts b/client/src/app/shared/guards/can-deactivate-guard.service.ts index 15618f699..c3b5f37f8 100644 --- a/client/src/app/shared/guards/can-deactivate-guard.service.ts +++ b/client/src/app/shared/guards/can-deactivate-guard.service.ts @@ -15,7 +15,7 @@ export class CanDeactivateGuard implements CanDeactivate currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState: RouterStateSnapshot - ): Observable | boolean { + ) { const result = component.canDeactivate() const text = result.text || 'All unsaved data will be lost, are you sure you want to leave this page?'