mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-24 19:33:01 +01:00
Minor code review
This commit is contained in:
parent
442331136c
commit
51edb13a06
@ -51,14 +51,13 @@ export function spoofCSS(
|
||||
const privatePropToValueMap = new Map();
|
||||
for ( let i = 0; i < args.length; i += 2 ) {
|
||||
const prop = toCamelCase(args[i+0]);
|
||||
if ( typeof prop !== 'string' ) { break; }
|
||||
if ( prop === '' ) { break; }
|
||||
const value = args[i+1];
|
||||
if ( typeof value !== 'string' ) { break; }
|
||||
if ( prop.charCodeAt(0) === 0x5F /* _ */ ) {
|
||||
privatePropToValueMap.set(prop, value);
|
||||
} else {
|
||||
propToValueMap.set(toCamelCase(prop), value);
|
||||
propToValueMap.set(prop, value);
|
||||
}
|
||||
}
|
||||
const safe = safeSelf();
|
||||
|
Loading…
Reference in New Issue
Block a user