fix: adds optional chaining to safely read drafts setting on versions (#577)
This commit is contained in:
@@ -32,7 +32,7 @@ async function update<T extends TypeWithID = any>(this: Payload, args): Promise<
|
||||
|
||||
let { data } = args;
|
||||
|
||||
const shouldSaveDraft = Boolean(draftArg && globalConfig.versions.drafts);
|
||||
const shouldSaveDraft = Boolean(draftArg && globalConfig.versions?.drafts);
|
||||
|
||||
// /////////////////////////////////////
|
||||
// 1. Retrieve and execute access
|
||||
|
||||
Reference in New Issue
Block a user