@colijnit/mainapi 262.1.12 → 262.1.14
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/build/main-auth.js
CHANGED
|
@@ -774,7 +774,7 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
|
774
774
|
getImage(key_1) {
|
|
775
775
|
return __awaiter(this, arguments, void 0, function* (key, publication = 4, includeMimetype = false, thumb = true, tableName = table_name_enum_1.TableName.Goods) {
|
|
776
776
|
const getImageObject = yield this.getSingleImage(key, publication, includeMimetype, thumb, tableName);
|
|
777
|
-
if (getImageObject.validationResult && getImageObject.validationResult.success) {
|
|
777
|
+
if (getImageObject && getImageObject.validationResult && getImageObject.validationResult.success) {
|
|
778
778
|
if (getImageObject.resultObject) {
|
|
779
779
|
const document = getImageObject.resultObject;
|
|
780
780
|
const type = document.documentType;
|
package/build/main-public.js
CHANGED
|
@@ -431,7 +431,7 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
431
431
|
getImage(key_1) {
|
|
432
432
|
return __awaiter(this, arguments, void 0, function* (key, publication = 4, includeMimetype = false, thumb = true) {
|
|
433
433
|
const getImageObject = yield this.getSingleImage(key, publication, includeMimetype, thumb, table_name_enum_1.TableName.Goods);
|
|
434
|
-
if (getImageObject.validationResult && getImageObject.validationResult.success) {
|
|
434
|
+
if (getImageObject && getImageObject.validationResult && getImageObject.validationResult.success) {
|
|
435
435
|
if (getImageObject.resultObject) {
|
|
436
436
|
const document = getImageObject.resultObject;
|
|
437
437
|
const type = document.documentType;
|
|
@@ -78,7 +78,7 @@ let CoDocument = class CoDocument extends business_object_1.BusinessObject {
|
|
|
78
78
|
this._mimeTypeInternal = value;
|
|
79
79
|
}
|
|
80
80
|
get bodyAsDataUri() {
|
|
81
|
-
if (this.
|
|
81
|
+
if (this.documentBody) {
|
|
82
82
|
return this.documentBodyAsDataUri;
|
|
83
83
|
}
|
|
84
84
|
else if (this.thumbnailBody) {
|