DEV: Allow use of qunit notrycatch mode (#17433)

This is useful when debugging exceptions - when the box is checked, exceptions will be thrown and handled by the browser rather than being absorbed by qunit. This allows developers to intercept the exception and inspect the stack.
This commit is contained in:
David Taylor 2022-07-11 21:40:38 +01:00 committed by GitHub
parent d39334b640
commit 9e9e843136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 8 deletions

View File

@ -117,14 +117,9 @@ function createApplication(config, settings) {
function setupToolbar() {
// Most default toolbar items aren't useful for Discourse
QUnit.config.urlConfig = QUnit.config.urlConfig.reject((c) =>
[
"noglobals",
"notrycatch",
"nolint",
"devmode",
"dockcontainer",
"nocontainer",
].includes(c.id)
["noglobals", "nolint", "devmode", "dockcontainer", "nocontainer"].includes(
c.id
)
);
QUnit.config.urlConfig.push({