I am using the Insert module with the Media Library module and I'm seeing the following JS error when no files have been uploaded to the field: "drupal.js?v=8.7.2:13 Uncaught TypeError: Cannot read property 'classes' of undefined at aggregateClassesToRetain (insert.js?v=2.x:112)".
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | insert-js-error-no-files_3059762_1.patch | 467 bytes | rromore |
Comments
Comment #2
rromore commentedAttaching a patch that ensures the `drupalSettings.insert.classes` object exists before attempting to use.
Comment #3
rromore commentedComment #4
snater commentedThank you. That seems to be a valid hotfix. The optimum would be Insert not yet initializing under that circumstance. I will have a look into that as soon as I have a bit of time.
Comment #6
snater commented