Skip to content

Adding a verification of obj value if not an array so we don't try to use push on a empty string#1195

Open
emitlinks wants to merge 1 commit into
pluginsGLPI:mainfrom
emitlinks:emitlinks-patch-dropdown
Open

Adding a verification of obj value if not an array so we don't try to use push on a empty string#1195
emitlinks wants to merge 1 commit into
pluginsGLPI:mainfrom
emitlinks:emitlinks-patch-dropdown

Conversation

@emitlinks
Copy link
Copy Markdown

Checklist before requesting a review

Please delete options that are not relevant.

  • [ x ] I have performed a self-review of my code.

Description

  • It fixes Buggy dropdown won't close properly and doesn't set value correctly sometimes #1155
  • Here is a brief description of what this PR does :
    It checks the value of the item that has multiple matches in obj to see if it's an empty string instead of an empty array (this can happen when a multi-value field is checked) in which case it's replaced by an empty array so the code doesn't bug when trying to push a value to a string.

Copy link
Copy Markdown
Contributor

@stonebuzz stonebuzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you adapt CHANGELOG.md

@Rom1-B Rom1-B self-requested a review May 13, 2026 07:20
@emitlinks emitlinks force-pushed the emitlinks-patch-dropdown branch from ca0c3a4 to 145210e Compare May 13, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Buggy dropdown won't close properly and doesn't set value correctly sometimes

2 participants