Fix regression causing exceptions to be thrown

Related commit:
- 1c3b45f75d

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1513
This commit is contained in:
Raymond Hill 2021-03-03 10:51:56 -05:00
parent c80afb805e
commit 404e6252d6
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -190,7 +190,10 @@ const onMessage = function(request, sender, callback) {
case 'userSettings':
response = µb.changeUserSettings(request.name, request.value);
if ( vAPI.net.canUncloakCnames !== true ) {
if (
vAPI.net.canUncloakCnames !== true &&
response instanceof Object
) {
response.cnameUncloakEnabled = undefined;
}
break;