Skip to content

Commit 4c8bfc5

Browse files
chore(internal): pass props through internal parser (#1125)
1 parent 67a4b65 commit 4c8bfc5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ export class APIPromise<T> extends Promise<T> {
9898
});
9999
}
100100

101-
_thenUnwrap<U>(transform: (data: T) => U): APIPromise<U> {
102-
return new APIPromise(this.responsePromise, async (props) => transform(await this.parseResponse(props)));
101+
_thenUnwrap<U>(transform: (data: T, props: APIResponseProps) => U): APIPromise<U> {
102+
return new APIPromise(this.responsePromise, async (props) =>
103+
transform(await this.parseResponse(props), props),
104+
);
103105
}
104106

105107
/**

0 commit comments

Comments
 (0)