AfterUpdate Hook?

Hi @benjamin-bavel-wix , @brett-haralson , @yisrael-wix ,

I have two collections collection1 and collection2, I want some fields from collection 1 to be used in collection 2, I have provided a very basic example below, collection1 holds private information and I do not want it in collection 2, so the below code is working and achieving what I would like it to, however I get a message in the console saying that the “afterUpdate Hook has been ignored, it expected to resolve to and “_id” but returned [undefined]” now I am normally ok with site code but as this is in “data.js” I need to make sure that the code populates only the right item in collection2 as this will be utilised for a public members profile. As I am the admin all items at present will have my “_owner” and “_id” so to test this I am finding it difficult. If someone could review the code and help me understand why I am getting the “Hook Ignored” message in my console it would be great.

export function collection1_afterUpdate(item, context) {
wixData.get("Collection1", context.userId)
.then((results) => {
let data = {
"_id": results._id,
"_owner": results._owner,
......
};
wixData.update("collection2", data)
return data;
});
}