mirror of
https://github.com/flarum/framework.git
synced 2025-05-23 23:29:57 +08:00
Improve appearance/behaviour of login/signup/forgot modals
This commit is contained in:
@ -18,11 +18,12 @@ class App {
|
||||
}
|
||||
|
||||
request(options) {
|
||||
options.extract = options.extract || function(xhr, xhrOptions) {
|
||||
var extract = options.extract;
|
||||
options.extract = function(xhr, xhrOptions) {
|
||||
if (xhr.status === 500) {
|
||||
throw new ServerError;
|
||||
}
|
||||
return xhr.responseText;
|
||||
return extract ? extract(xhr.responseText) : (xhr.responseText.length === 0 ? null : xhr.responseText);
|
||||
};
|
||||
|
||||
return m.request(options).then(response => {
|
||||
|
Reference in New Issue
Block a user