autobahn-js
autobahn-js copied to clipboard
TimeoutError unintentionally mangled in autobahn.min.js
Issues on https://github.com/crossbario/autobahn-js-browser are closed, so opening this Issue here.
TimeoutError in the minified autobahn-js-browser/autobahn.min.js is incorrectly
mangled to a
. See
- https://jsfiddle.net/mbcz682j/
This breaks TimeoutError testing, e.g.
try {
session.call('foo').timeout(123)
} catch (err) {
if (err.name === 'TimeoutError') { // err.name is 'a', not 'TimeoutError'.
...
}
}
TimeoutError isn't mangled in the unminified autobahn-js-browser/autobahn.js.
- https://jsfiddle.net/b0Ls05qe/
The fix is (likely) just to preserve TimeoutError in the build/minification process (and any other unintentionally mangled names).
All the minimization is done by Google Closure compiler, so if the mangling is incorrect, this issue is highly likely upstream.