From e1cce311e8a24f1183c377104fd6c31017ebf441 Mon Sep 17 00:00:00 2001 From: Corrado Lombardi Date: Thu, 22 Oct 2020 15:46:05 +0200 Subject: [PATCH] [CSTPER-66] utility method to check if remote data has no content --- src/app/core/data/remote-data.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/core/data/remote-data.ts b/src/app/core/data/remote-data.ts index 8502c8ba1d..17fbe6a8a6 100644 --- a/src/app/core/data/remote-data.ts +++ b/src/app/core/data/remote-data.ts @@ -55,4 +55,8 @@ export class RemoteData { return this.state === RemoteDataState.Success; } + get hasNoContent(): boolean { + return this.statusCode === 204; + } + }