Skip to content

Commit

Permalink
Release 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreBonaventure committed Mar 25, 2018
1 parent 809d324 commit 6c87c1f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions dist/vue-mq.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ function convertBreakpointsToMediaQueries(breakpoints) {
}
function transformValuesFromBreakpoints(breakpoints, values, currentBreakpoint) {
var findClosestValue = function findClosestValue(currentBreakpoint) {
if (values[currentBreakpoint] !== undefined) return values[currentBreakpoint];
var index = breakpoints.findIndex(function (b) {
return b === currentBreakpoint;
});
var newBreakpoint = index !== -1 || index !== 0 ? breakpoints[index - 1] : null;
if (!newBreakpoint) return values[index];
return values[newBreakpoint] || findClosestValue(newBreakpoint);
return values[newBreakpoint] !== undefined ? values[newBreakpoint] : findClosestValue(newBreakpoint);
};

var result = values[currentBreakpoint] || findClosestValue(currentBreakpoint);
return result;
return findClosestValue(currentBreakpoint);
}
function selectBreakpoints(breakpoints, currentBreakpoint) {
var index = breakpoints.findIndex(function (b) {
Expand Down
6 changes: 3 additions & 3 deletions dist/vue-mq.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ function convertBreakpointsToMediaQueries(breakpoints) {
}
function transformValuesFromBreakpoints(breakpoints, values, currentBreakpoint) {
var findClosestValue = function findClosestValue(currentBreakpoint) {
if (values[currentBreakpoint] !== undefined) return values[currentBreakpoint];
var index = breakpoints.findIndex(function (b) {
return b === currentBreakpoint;
});
var newBreakpoint = index !== -1 || index !== 0 ? breakpoints[index - 1] : null;
if (!newBreakpoint) return values[index];
return values[newBreakpoint] || findClosestValue(newBreakpoint);
return values[newBreakpoint] !== undefined ? values[newBreakpoint] : findClosestValue(newBreakpoint);
};

var result = values[currentBreakpoint] || findClosestValue(currentBreakpoint);
return result;
return findClosestValue(currentBreakpoint);
}
function selectBreakpoints(breakpoints, currentBreakpoint) {
var index = breakpoints.findIndex(function (b) {
Expand Down
6 changes: 3 additions & 3 deletions dist/vue-mq.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ function convertBreakpointsToMediaQueries(breakpoints) {
}
function transformValuesFromBreakpoints(breakpoints, values, currentBreakpoint) {
var findClosestValue = function findClosestValue(currentBreakpoint) {
if (values[currentBreakpoint] !== undefined) return values[currentBreakpoint];
var index = breakpoints.findIndex(function (b) {
return b === currentBreakpoint;
});
var newBreakpoint = index !== -1 || index !== 0 ? breakpoints[index - 1] : null;
if (!newBreakpoint) return values[index];
return values[newBreakpoint] || findClosestValue(newBreakpoint);
return values[newBreakpoint] !== undefined ? values[newBreakpoint] : findClosestValue(newBreakpoint);
};

var result = values[currentBreakpoint] || findClosestValue(currentBreakpoint);
return result;
return findClosestValue(currentBreakpoint);
}
function selectBreakpoints(breakpoints, currentBreakpoint) {
var index = breakpoints.findIndex(function (b) {
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-mq.min.js

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

2 changes: 1 addition & 1 deletion dist/vue-mq.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-mq",
"version": "0.1.2",
"version": "0.1.3",
"description": "Handle media queries easily & build responsive design with Vue",
"main": "dist/vue-mq.js",
"module": "dist/vue-mq.es.js",
Expand Down

0 comments on commit 6c87c1f

Please sign in to comment.