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

fix(gen): use bool for bootstrap filters #497

Merged
merged 1 commit into from
Aug 29, 2014

Conversation

kingcody
Copy link
Member

Changes:

  • filters.bootstrap and filters.uibootstrap will be true or false only

Closes #496

@kingcody
Copy link
Member Author

@DaftMonk would you rather use !! to cast to bool as opposed to using a ternary? Double neg looks cleaner IMO, but may be confusing to others.

@DaftMonk
Copy link
Member

Ok I was able to reproduce the issue. I was using a different version of the generator.

Personally I think !! is more clear.

Changes:
- `filters.bootstrap` and `filters.uibootstrap` will be true or false only

Closes angular-fullstack#496
@kingcody
Copy link
Member Author

Changed ternary to !!

@kingcody
Copy link
Member Author

Build passes here, but 0.11 fails on my repo; so odd. I know Patrick was having sporadic Travis builds the other day.

@kingcody
Copy link
Member Author

@DaftMonk, just want to point out that the root cause of this issue is:

  • filters.uibootstrap is set to undefined when bootstrap is not selected
  • line 237-240 in app/index.js (gen) sets defaults with _.defaults()

Since uibootstrap is undefined and not false lodash sets it to the default of true as seen on line 239.

DaftMonk added a commit that referenced this pull request Aug 29, 2014
fix(gen): use bool for bootstrap filters
@DaftMonk DaftMonk merged commit 9ec4151 into angular-fullstack:master Aug 29, 2014
@kingcody kingcody deleted the fix/bootstrap-prompts branch August 30, 2014 18:24
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.

Bootstrap variables still get included
2 participants