Skip to content

Commit 73ef247

Browse files
committed
Fix error
1 parent d1717b4 commit 73ef247

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/response.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ class Response {
33
constructor({
44
status,
55
data = {},
6+
statusText = '',
67
}) {
78
this.status = status;
89
this.data = data;
10+
this.statusText = statusText;
911
}
1012

1113
text() {
1214
try {
13-
return Promise.solve(JSON.stringify(data));
15+
return Promise.resolve(JSON.stringify(data));
1416
} catch (err) {
1517
return Promise.reject(new Errror('failed text invoke.'));
1618
}

0 commit comments

Comments
 (0)