Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
27 lines
792 B
Plaintext
27 lines
792 B
Plaintext
import { traverseFields } from './traverseFields.js';
|
|
/**
|
|
* This function is responsible for the following actions, in order:
|
|
* - Execute field hooks
|
|
*/ export const afterChange = async ({ collection, context, data, doc: incomingDoc, global, operation, previousDoc, req })=>{
|
|
await traverseFields({
|
|
collection,
|
|
context,
|
|
data,
|
|
doc: incomingDoc,
|
|
fields: collection?.fields || global?.fields,
|
|
global,
|
|
operation,
|
|
parentIndexPath: '',
|
|
parentIsLocalized: false,
|
|
parentPath: '',
|
|
parentSchemaPath: '',
|
|
previousDoc,
|
|
previousSiblingDoc: previousDoc,
|
|
req,
|
|
siblingData: data,
|
|
siblingDoc: incomingDoc
|
|
});
|
|
return incomingDoc;
|
|
};
|
|
|
|
//# sourceMappingURL=index.js.map |