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

🐛 Prevent toggle() from throwing error when no elements are selected. #20795

Merged
merged 6 commits into from
Feb 15, 2019

Conversation

caroqliu
Copy link
Contributor

@caroqliu caroqliu commented Feb 12, 2019

Resolves #20773

  • Make sure methods do not call clearSelection(el) when el is 'undefined'; toggle() and select() were noted to pass in 'undefined' when no elements are selected.
  • Add /examples/selector.amp.html to manually test behavioral changes.

Copy link
Contributor

@cvializ cvializ left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this! I have a suggestion

extensions/amp-selector/0.1/amp-selector.js Outdated Show resolved Hide resolved
@aghassemi aghassemi merged commit bf696c9 into ampproject:master Feb 15, 2019
@caroqliu caroqliu deleted the toggle-selector branch February 21, 2019 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants