Fix extension function missing code files when exporting a project (#4665)

* The issue happened when a behavior used a function from its extension which itself also used another function.
This commit is contained in:
D8H
2022-12-12 14:32:23 +01:00
committed by GitHub
parent 52278180ab
commit 74cc7ac684

View File

@@ -158,17 +158,13 @@ const getExtensionIncludeFiles = (
return mapFor(0, eventsFunctionsExtension.getEventsFunctionsCount(), i => {
const eventsFunction = eventsFunctionsExtension.getEventsFunctionAt(i);
if (isExtensionLifecycleEventsFunction(eventsFunction.getName())) {
const codeNamespace = getFreeFunctionCodeNamespace(
eventsFunction,
codeNamespacePrefix
);
const functionName = codeNamespace + '.func'; // TODO
const codeNamespace = getFreeFunctionCodeNamespace(
eventsFunction,
codeNamespacePrefix
);
const functionName = codeNamespace + '.func'; // TODO
return options.eventsFunctionCodeWriter.getIncludeFileFor(functionName);
}
return null;
return options.eventsFunctionCodeWriter.getIncludeFileFor(functionName);
}).filter(Boolean);
};