Skip to content

Commit

Permalink
fix: double-check that ev.detail exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mbi committed Oct 2, 2023
1 parent 5d9ca31 commit 797fd21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filer/static/filer/js/addons/dropzone.init.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ djQuery(function ($) {
// There is no way to feature detect the new behavior implemented in Django 1.9
if (!window.__admin_utc_offset__) {
$(document).on('formset:added', function (ev, row) {
if(ev.detail.formsetName) {
if(ev.detail && ev.detail.formsetName) {
/*
Django 4.1 changed the event type being fired when adding
a new formset from a jQuery to a vanilla JavaScript event.
Expand Down

0 comments on commit 797fd21

Please sign in to comment.