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

Supersubs: TypeError: fontsize.attr(...).appendTo(...)[0] is undefined #163

Open
jacobembree opened this issue Sep 28, 2016 · 0 comments
Open

Comments

@jacobembree
Copy link

When the menu contains only one item, hence, no children, this error will occur.

supersubs.js:
}).appendTo($$)[0].clientWidth; //clientWidth is faster than .width()
That line expects an array of elements. If there is only one then the error will occur. If instead of [0], .first() is used, the same result will be achieved without the requirement that there be more than one element. The line would then become:
.appendTo($$).first().clientWidth; //clientWidth is faster than width()

See also: "TypeError: fontsize.attr(...).appendTo(...)[0] is undefined" Issue With NavBar

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

No branches or pull requests

1 participant