Skip to content

Commit 8ea8072

Browse files
committed
fix(jsonView): fix promise return
1 parent 5fa545d commit 8ea8072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/decorators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function JsonView(params?: {}, method?: string): Function {
6666

6767
if (!!result && (typeof result === "object" || typeof result === "function") && typeof result.then === "function") {
6868
// If result is an instance of Promise.
69-
return result.then((data: any) => transformer(result, params));
69+
return result.then((data: any) => transformer(data, params));
7070
}
7171

7272
result = transformer(result, params);

0 commit comments

Comments
 (0)