mirror of
https://github.com/flarum/framework.git
synced 2025-02-18 06:52:44 +08:00
Fix echo
statements not showing up in debug modals or console trace
This was accidentially introduced in the recent Application permissions refactor, where `formattedError`was changed to always be a string array.
This commit is contained in:
parent
7982dcd578
commit
2afe93a02c
|
@ -547,7 +547,11 @@ export default class Application {
|
|||
|
||||
console.group(`${method} ${url} ${status}`);
|
||||
|
||||
console.error(...(formattedErrors || [e]));
|
||||
if (formattedErrors.length) {
|
||||
console.error(...formattedErrors);
|
||||
} else {
|
||||
console.error(e)
|
||||
}
|
||||
|
||||
console.groupEnd();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ export default class RequestErrorModal<CustomAttrs extends IRequestErrorModalAtt
|
|||
|
||||
// If the error is already formatted, just add line endings;
|
||||
// else try to parse it as JSON and stringify it with indentation
|
||||
if (formattedError) {
|
||||
if (formattedError.length) {
|
||||
responseText = formattedError.join('\n\n');
|
||||
} else if (error.response) {
|
||||
responseText = JSON.stringify(error.response, null, 2);
|
||||
|
|
Loading…
Reference in New Issue
Block a user