Skip to content

SplitButton: Prevent querySelector from running on undefined #56

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

Closed

Conversation

rosslavery
Copy link

Check that the ul exists before possibly running querySelector on undefined.

Prevents the following error:

ERROR TypeError: Cannot read property 'querySelector' of undefined
    at DropDownButton.push../node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/drop-down-button.js.DropDownButton.removeCustomSelection (drop-down-button.js:304)
    at Observer.<anonymous> (drop-down-button.js:411)
    at Observer.push../node_modules/@syncfusion/ej2-base/src/observer.js.Observer.notify (observer.js:84)
    at DropDownButton.push../node_modules/@syncfusion/ej2-base/src/base.js.Base.trigger (base.js:152)
    at DropDownButton.push../node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/drop-down-button.js.DropDownButton.closePopup (drop-down-button.js:408)
    at DropDownButton.push../node_modules/@syncfusion/ej2-splitbuttons/src/drop-down-button/drop-down-button.js.DropDownButton.mousedownHandler (drop-down-button.js:351)
    at HTMLDocument.__trace__ (bugsnag.js:2211)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:17289)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)

@rosslavery rosslavery changed the title Prevent querySelector from running on undefined SplitButton: Prevent querySelector from running on undefined Jul 29, 2019
@sangeethapriyaM
Copy link

Hi @rosslavery ,

Greetings from Syncfusion support.

We have checked your reported issue, unfortunately we are not able to reproduce it in our end. And, we have considered your source changes in our end. However, we need the following details to find the exact cause of this issue.

  1. Please share us the detailed description of your reported issue.
  2. Share the issue replicable sample or code block to replicate in our end.

Could you please share the above details, based on that we will check and provide you a better solution quickly.

Regards,
Sangeetha M

@Sridhar-Narasimhan
Copy link

We are closing this thread now since there is no activity and long pending.

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.

3 participants