Cannot read properties of undefined (reading 'add_in_between')

Created on 3 August 2023, over 1 year ago
Updated 29 November 2023, 12 months ago

Problem/Motivation

When entering an edit form utilizing the library "add_in_between", the associated JavaScript file with this library triggers a console error due to trying to access an uninitialized value, when the drupalSettings.paragraphs_features object has not been initialized before.

Steps to reproduce

- Configure a content type utilizing paragraphs
- enable "add in between" buttons on the form display settings for the field widget for the paragraphs field
- access the form and watch the browser's console

Proposed resolution

Use conditional chaining syntax (see attached patch).

Remaining tasks

- none / testing -

User interface changes

- none -

API changes

- none -

Data model changes

- none -

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany CHiLi.HH

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024