From 00a69b061f421de06e3f78c55178790e290795cd Mon Sep 17 00:00:00 2001 From: Felipe Sabino Date: Tue, 24 Oct 2017 17:25:07 -0200 Subject: [PATCH] Fixing null returns for @Pagination --- src/decorator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/decorator.ts b/src/decorator.ts index b8c2293..00ffcaa 100644 --- a/src/decorator.ts +++ b/src/decorator.ts @@ -406,7 +406,7 @@ export function Field(option?: FieldOption) { console.warn('Field can\'t be pagination enabled', propertyKey); return; } - setPaginationMetadata(target, propertyKey, methodDescriptor); + return setPaginationMetadata(target, propertyKey, methodDescriptor); } } @@ -453,7 +453,7 @@ export function Before(middleware: Middleware) { export function Pagination() { return function (target: any, propertyKey: any, methodDescriptor: any) { - setPaginationMetadata(target, propertyKey, methodDescriptor); + return setPaginationMetadata(target, propertyKey, methodDescriptor); } as Function; }