mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Fix faulty as vararg in set-constant scriptlet
This commit is contained in:
parent
bd8a91ed3a
commit
c292a90b90
1 changed files with 5 additions and 4 deletions
|
|
@ -436,14 +436,15 @@ function setConstantCore(
|
|||
return;
|
||||
}
|
||||
if ( extraArgs.as !== undefined ) {
|
||||
const value = cValue;
|
||||
if ( extraArgs.as === 'function' ) {
|
||||
cValue = ( ) => cValue;
|
||||
cValue = ( ) => value;
|
||||
} else if ( extraArgs.as === 'callback' ) {
|
||||
cValue = ( ) => (( ) => cValue);
|
||||
cValue = ( ) => (( ) => value);
|
||||
} else if ( extraArgs.as === 'resolved' ) {
|
||||
cValue = Promise.resolve(cValue);
|
||||
cValue = Promise.resolve(value);
|
||||
} else if ( extraArgs.as === 'rejected' ) {
|
||||
cValue = Promise.reject(cValue);
|
||||
cValue = Promise.reject(value);
|
||||
}
|
||||
}
|
||||
let aborted = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue