Skip to content

Commit

Permalink
[backend] Prevent prepareElementForIndexing to block event loop
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-julien committed Jan 28, 2025
1 parent 22338c0 commit e99ae51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opencti-platform/opencti-graphql/src/database/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -3880,7 +3880,7 @@ export const prepareElementForIndexing = async (element) => {
if (isDateAttribute(key)) { // Date is an object but natively supported
preparedArray.push(valueElement);
} else if (R.is(String, valueElement)) { // For string, trim by default
return preparedArray.push(valueElement.trim());
preparedArray.push(valueElement.trim());
} else if (R.is(Object, valueElement) && Object.keys(value).length > 0) { // For complex object, prepare inner elements
const complexPrepared = await prepareElementForIndexing(valueElement);
preparedArray.push(complexPrepared);
Expand Down

0 comments on commit e99ae51

Please sign in to comment.