@lifeready/core 6.0.3 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/lifeready-core.umd.js +15 -12
- package/bundles/lifeready-core.umd.js.map +1 -1
- package/bundles/lifeready-core.umd.min.js +1 -1
- package/bundles/lifeready-core.umd.min.js.map +1 -1
- package/esm2015/lib/_common/utils.js +2 -5
- package/esm2015/lib/file-upload/file-upload.service.js +14 -9
- package/esm2015/lib/item2/item2.types.js +1 -1
- package/fesm2015/lifeready-core.js +14 -12
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/file-upload/file-upload.service.d.ts +1 -1
- package/lib/item2/item2.types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -637,10 +637,7 @@
|
|
|
637
637
|
case 2:
|
|
638
638
|
error_1 = _a.sent();
|
|
639
639
|
// The error thrown by Cognito is of type string.
|
|
640
|
-
|
|
641
|
-
return [2 /*return*/, ''];
|
|
642
|
-
}
|
|
643
|
-
throw error_1;
|
|
640
|
+
return [2 /*return*/, ''];
|
|
644
641
|
case 3: return [2 /*return*/];
|
|
645
642
|
}
|
|
646
643
|
});
|
|
@@ -8844,14 +8841,20 @@
|
|
|
8844
8841
|
FileUploadService.prototype.loadFile = function (file) {
|
|
8845
8842
|
return __awaiter(this, void 0, void 0, function () {
|
|
8846
8843
|
return __generator(this, function (_a) {
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8844
|
+
if (file instanceof ArrayBuffer) {
|
|
8845
|
+
return [2 /*return*/, file];
|
|
8846
|
+
}
|
|
8847
|
+
else {
|
|
8848
|
+
return [2 /*return*/, new Promise(function (resolve) {
|
|
8849
|
+
var reader = new FileReader();
|
|
8850
|
+
reader.onload = function () {
|
|
8851
|
+
// OK to type cast here since we are using readAsArrayBuffer.
|
|
8852
|
+
resolve(reader.result);
|
|
8853
|
+
};
|
|
8854
|
+
reader.readAsArrayBuffer(file);
|
|
8855
|
+
})];
|
|
8856
|
+
}
|
|
8857
|
+
return [2 /*return*/];
|
|
8855
8858
|
});
|
|
8856
8859
|
});
|
|
8857
8860
|
};
|