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

Fixed issue with wrong active value for widths smalller than smallest breakpoint #10

Merged
merged 3 commits into from
Oct 31, 2016
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{
"name": "include-media-export",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/eduardoboucas/include-media-export",
"authors": [
"Eduardo Boucas <[email protected]>"
Expand Down
1 change: 0 additions & 1 deletion dist/include-media-1.0.1.min.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/include-media-1.0.2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions include-media.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
breakpoints = JSON.parse(removeQuotes(data));
} catch (err) {}
}
else {
Copy link
Owner

Choose a reason for hiding this comment

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

Do you mind putting the else on the previous line, next to the closing curly brace, as per the rest of the file?

Also, should it return null instead of false?

Copy link
Author

Choose a reason for hiding this comment

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

Hey,

I'll update formatting in a sec.

When it comes to return value false is the default value for breakpoints variable so i thought it makes more sense. Shall i change it anyway?

Copy link
Owner

Choose a reason for hiding this comment

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

Sorry, you're right! I haven't looked at this code for a while...

Copy link
Author

Choose a reason for hiding this comment

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

I pushed updated version with fixed formatting.

breakpoints = false;
}
}

function isBreakpointActive(breakpoint) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "include-media-export",
"name": "include-media-export",
"version": "1.0.1",
"version": "1.0.2",
"description": "An include-media plugin for exporting breakpoints from Sass to JavaScript",
"repository": {
"type": "git",
Expand Down