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

Update Gruntfile.js fixing undefined jQuery check #10863

Merged
merged 1 commit into from
Sep 29, 2013

Conversation

DeanMarkTaylor
Copy link
Contributor

The check to see if jQuery was defined as incorrect causing the "Bootstrap requires jQuery" message to only be displayed if jQuery is defined and has a value which equates to false.

The check to see if jQuery was defined as incorrect causing the "Bootstrap requires jQuery" message to only be displayed if jQuery is defined and has a value which equates to `false`.
@cvrebert
Copy link
Collaborator

I am reasonably sure that it works as-is. undefined is a falsey value.

@DeanMarkTaylor
Copy link
Contributor Author

It doesn't work, tested in Chrome:
Chrome/29.0.1547.76 Safari/537.36
Screen Capture

@cvrebert
Copy link
Collaborator

Hmm. Confirmed.

@DeanMarkTaylor
Copy link
Contributor Author

An alternative way of handling this could be
if (!window.jQuery) { throw new Error("Bootstrap requires jQuery") }

@cvrebert
Copy link
Collaborator

Considering #10038, your method seems fine.

cvrebert added a commit that referenced this pull request Sep 29, 2013
Update Gruntfile.js fixing undefined jQuery check
@cvrebert cvrebert merged commit a84bd5d into twbs:master Sep 29, 2013
@cvrebert
Copy link
Collaborator

/cc @fat In case you wanna tweak this before final release.

@mdo mdo mentioned this pull request Sep 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants