Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dropdown] Cannot read property 'observe' of undefined #784

Closed
GammaGames opened this issue May 29, 2019 · 1 comment
Closed

[Dropdown] Cannot read property 'observe' of undefined #784

GammaGames opened this issue May 29, 2019 · 1 comment
Assignees
Labels
lang/javascript Anything involving JavaScript type/bug Any issue which is a bug or PR which fixes a bug
Milestone

Comments

@GammaGames
Copy link
Contributor

Bug Report

Steps to reproduce

  1. Create search dropdown
  2. Call dropdown on element with values and allowAdditions: true
  3. Be sad when it doesn't work

Expected result

Should work all happy

Actual result

Throws error and dropdown is broken

Testcase

https://jsfiddle.net/6t70ce54/

Screenshot (when possible)

image

Version

2.7.5

Notes

Was initially reported at Semantic-Org/Semantic-UI/issues/5018, but the stale bot closed it. @nosheenzazafd had a solution as well:

Looking at the source code, I noticed that every time selectObserver is dereferenced, it is guarded with if(selectObserver), except for the statement at line 165. I believe this statement also needs to be guarded with the same check. I did this and it fixed my problem. If needed I can provide more details to reproduce this error, however it seems to be a logic bug in the code.

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug lang/javascript Anything involving JavaScript labels May 29, 2019
@lubber-de lubber-de self-assigned this May 29, 2019
@lubber-de
Copy link
Member

Fixed by #785 accordingly
See your adjusted jsfiddle here https://jsfiddle.net/7rsge546/

@lubber-de lubber-de added this to the 2.7.6 milestone May 29, 2019
@lubber-de lubber-de added the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jun 6, 2019
@y0hami y0hami closed this as completed in e7ebb38 Jun 16, 2019
@lubber-de lubber-de removed the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants