Reload uncaughtException plugin if enableUncaught changes, same with unhandledRejection #1163
Closed
5 tasks done
Labels
js
@honeybadger-io/js
See #1161 (comment).
Currently, the listeners for
uncaughtException
andunhandledRejection
are only added if the corresponding setting istrue
. Then the listener decides not to report if the user later changes the setting tofalse
. This is reasonable, but inconsistent because if the user sets up Honeybadger with the setting off, then later flips it totrue
, the plugin will not be reloaded and the listener will never be attached.We prefer to reload the plugin if
enableUncaught
changes. (ie remove the listener if the value is set to false and add it if it's set to true). Same deal withenableUnhandledRejection
.The text was updated successfully, but these errors were encountered: