1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Code simplification

This commit is contained in:
kkapsner 2024-08-15 16:59:20 +02:00
parent 91dd283b9a
commit cee0f75293

View File

@ -344,15 +344,11 @@
let changed; let changed;
if (type ==="value"){ if (type ==="value"){
if (changedFunction.fakeGenerator){ if (changedFunction.fakeGenerator){
const generated = changedFunction.fakeGenerator(checker, original, windowToProcess);
if ((changedFunction.exportOptions || {}).allowCallbacks){ if ((changedFunction.exportOptions || {}).allowCallbacks){
changed = extension.exportFunctionWithName( changed = extension.exportFunctionWithName(generated, windowToProcess, original.name);
changedFunction.fakeGenerator(checker, original, windowToProcess),
windowToProcess,
original.name
);
} }
else { else {
const generated = changedFunction.fakeGenerator(checker, original, windowToProcess);
changed = extension.createProxyFunction(windowToProcess, original, generated); changed = extension.createProxyFunction(windowToProcess, original, generated);
} }
} }