Refs #33328 -- Corrected JS check for event.detail presence in docs.

This commit is contained in:
Claude Paroz 2022-04-18 15:19:58 +02:00 committed by GitHub
parent 8e89dfe1c2
commit fe7cb34544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ to the old listener signature as follows:
} }
$(document).on('formset:added', (event, $row, formsetName) => { $(document).on('formset:added', (event, $row, formsetName) => {
if (event.detail.formsetName) { if (event.detail && event.detail.formsetName) {
// Django >= 4.1 // Django >= 4.1
handleFormsetAdded(event.target, event.detail.formsetName) handleFormsetAdded(event.target, event.detail.formsetName)
} else { } else {