Skip to content

Commit

Permalink
* core: try to set data on request failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Jun 21, 2024
1 parent 6ca85d9 commit f214128
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/core/src/ajax/ajax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ export class Ajax<T> {
const filteredData = dataFilter?.(data, dataType) ?? data;
this._emit('success', filteredData, statusText, response);
} else {
this.data = await response.text() as T;
throw new Error(statusText);
}
} catch (err) {
Expand Down

0 comments on commit f214128

Please sign in to comment.