Comparing version 0.8.0 to 0.8.1
@@ -25,2 +25,4 @@ "use strict"; | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } | ||
var initialState = { | ||
@@ -60,3 +62,5 @@ frames: [], | ||
if (fountain.data.length !== frames[0].data.length) { | ||
if (existingFramesData.length > 0 && fountain.data.length !== Math.min.apply(Math, _toConsumableArray(existingFramesData.map(function (f) { | ||
return f.length; | ||
})))) { | ||
// drop the fountain that no longer match the frames data length | ||
@@ -148,3 +152,3 @@ fountainsQueue.splice(i, 1); | ||
.filter(function (c) { | ||
return c.index !== index && c.framesCount === framesCount && c.data.length === data.length; | ||
return c.index !== index && c.framesCount === framesCount; | ||
}).concat({ framesCount: framesCount, index: index, data: data }) | ||
@@ -151,0 +155,0 @@ })); |
{ | ||
"name": "qrloop", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "Envelop big blob of data into frames that can be displayed in series of QR Codes", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -57,3 +57,7 @@ // @flow | ||
if (fountain.data.length !== frames[0].data.length) { | ||
if ( | ||
existingFramesData.length > 0 && | ||
fountain.data.length !== | ||
Math.min(...existingFramesData.map(f => f.length)) | ||
) { | ||
// drop the fountain that no longer match the frames data length | ||
@@ -145,8 +149,3 @@ fountainsQueue.splice(i, 1); | ||
// override frame by index and also make sure all frames have same framesCount. this allows to not be stucked and recover any scenario. | ||
.filter( | ||
c => | ||
c.index !== index && | ||
c.framesCount === framesCount && | ||
c.data.length === data.length | ||
) | ||
.filter(c => c.index !== index && c.framesCount === framesCount) | ||
.concat({ framesCount, index, data }) | ||
@@ -153,0 +152,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92715
1045