1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Output scriplet errors to console in dev build

This commit is contained in:
Raymond Hill 2023-08-08 10:29:54 -04:00
parent f8394ff2d5
commit 96d7b278b4
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -192,10 +192,11 @@ const lookupScriptlet = function(rawToken, mainMap, isolatedMap) {
}
targetWorldMap.set(rawToken, [
'try {',
'// >>>> scriptlet start',
content,
'// <<<< scriptlet end',
'// >>>> scriptlet start',
content,
'// <<<< scriptlet end',
'} catch (e) {',
isDevBuild ? 'console.error(e);' : '',
'}',
].join('\n'));
};