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.

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

1 participant