From fe7cb345448822528ce0447141810c27f9e56cff Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Mon, 18 Apr 2022 15:19:58 +0200 Subject: [PATCH] Refs #33328 -- Corrected JS check for event.detail presence in docs. --- docs/ref/contrib/admin/javascript.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ref/contrib/admin/javascript.txt b/docs/ref/contrib/admin/javascript.txt index ae1e546461..e1188a6f84 100644 --- a/docs/ref/contrib/admin/javascript.txt +++ b/docs/ref/contrib/admin/javascript.txt @@ -68,7 +68,7 @@ to the old listener signature as follows: } $(document).on('formset:added', (event, $row, formsetName) => { - if (event.detail.formsetName) { + if (event.detail && event.detail.formsetName) { // Django >= 4.1 handleFormsetAdded(event.target, event.detail.formsetName) } else {