Story selector form broken in 4.0.18

Created on 27 February 2025, about 1 month ago

Problem/Motivation

Changes in https://www.drupal.org/project/shorthand/issues/3452121 Gitlab CI: fix eslint Active have broken this module

if (option.value == 0) {

was changed to:

if (option.value === 0) {

However the zero is actually a string so now it fails to be excluded and then causes the following error
TypeError: Cannot read properties of undefined (reading 'description'), so either need to be changed back or changed to === '0'

While this part is being addressed, we shouldn't be excluding zero anyway. Once a story has been selected, there is currently no way to unselect all stories and set it back to 0. The field doesn't have to be set as a required field nor should it have to be.

The code also has a hardcoded field name in it, which is just not acceptable in a Drupal module. Users should be free to name their fields as they wish.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇬🇧United Kingdom paulmartin84

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024