devtools: Make isAsync and isGenerator optional (#44023)

Make `isAsync` and `isGenerator` optional

Testing: Current tests as passing
Fixes:  part of #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: eri <eri@igalia.com>
This commit is contained in:
atbrakhi
2026-04-09 13:52:09 +02:00
committed by GitHub
parent e9fbed1d74
commit f32cc3dc51
4 changed files with 12 additions and 8 deletions

View File

@@ -178,7 +178,7 @@ previewers.Function.push(function FunctionPreviewer(obj, depth) {
let function_details = {
name: obj.name,
displayName: obj.displayName,
parameterNames: obj.parameterNames,
parameterNames: obj.parameterNames ? obj.parameterNames: [],
isAsync: obj.isAsyncFunction,
isGenerator: obj.isGeneratorFunction,
}
@@ -192,7 +192,7 @@ previewers.Function.push(function FunctionPreviewer(obj, depth) {
kind: "Object",
ownProperties,
ownPropertiesLength,
function: funtion_details
function: function_details
};
});