From 404e6252d6056c67548247233b667f165b4acd2d Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 3 Mar 2021 10:51:56 -0500 Subject: [PATCH] Fix regression causing exceptions to be thrown Related commit: - https://github.com/gorhill/uBlock/commit/1c3b45f75d0f84d68abb51b15bbdc043464ee3e0 Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1513 --- src/js/messaging.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/messaging.js b/src/js/messaging.js index 5b442fc11..a0c9a1e4f 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -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;