From c045fdcb92e25714e45b1565f022714b83787113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20GU=C3=89RIN?= Date: Sun, 6 Oct 2024 18:12:45 +0200 Subject: [PATCH] Use the arrow notation to call the createtEditors() function on `formset:added` event. --- django_ckeditor_5/static/django_ckeditor_5/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_ckeditor_5/static/django_ckeditor_5/app.js b/django_ckeditor_5/static/django_ckeditor_5/app.js index cb33700..37fba91 100644 --- a/django_ckeditor_5/static/django_ckeditor_5/app.js +++ b/django_ckeditor_5/static/django_ckeditor_5/app.js @@ -156,7 +156,7 @@ document.addEventListener("DOMContentLoaded", () => { createEditors(); if (typeof django === "object" && django.jQuery) { - django.jQuery(document).on("formset:added", createEditors); + django.jQuery(document).on("formset:added", () => {createEditors()}); } const observer = new MutationObserver((mutations) => {