mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
refactor: Add lint rule for unsafe property access with lodash get/set (no-changelog) (#8587)
This commit is contained in:
@@ -76,9 +76,9 @@ export async function mediaUploadFromItem(
|
||||
if (!requestOptions.body) {
|
||||
requestOptions.body = {};
|
||||
}
|
||||
set(requestOptions.body as IDataObject, `${operation}.id`, result.id);
|
||||
set(requestOptions.body as IDataObject, [operation, 'id'], result.id);
|
||||
if (operation === 'document') {
|
||||
set(requestOptions.body as IDataObject, `${operation}.filename`, uploadData.fileName);
|
||||
set(requestOptions.body as IDataObject, [operation, 'filename'], uploadData.fileName);
|
||||
}
|
||||
|
||||
return requestOptions;
|
||||
|
||||
Reference in New Issue
Block a user