@colijnit/mainapi 261.1.11 → 261.1.13
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
|
@@ -721,7 +721,7 @@ class MainAuth extends main_api_connection_1.MainApiConnection {
|
|
|
721
721
|
getImage(key_1) {
|
|
722
722
|
return __awaiter(this, arguments, void 0, function* (key, publication = 4, includeMimetype = false, thumb = true, tableName = table_name_enum_1.TableName.Goods) {
|
|
723
723
|
const getImageObject = yield this.getSingleImage(key, publication, includeMimetype, thumb, tableName);
|
|
724
|
-
if (getImageObject.validationResult && getImageObject.validationResult.success) {
|
|
724
|
+
if (getImageObject && getImageObject.validationResult && getImageObject.validationResult.success) {
|
|
725
725
|
if (getImageObject.resultObject) {
|
|
726
726
|
const document = getImageObject.resultObject;
|
|
727
727
|
const type = document.documentType;
|
package/build/main-public.js
CHANGED
|
@@ -403,7 +403,7 @@ class MainPublic extends main_api_connection_1.MainApiConnection {
|
|
|
403
403
|
getImage(key_1) {
|
|
404
404
|
return __awaiter(this, arguments, void 0, function* (key, publication = 4, includeMimetype = false, thumb = true) {
|
|
405
405
|
const getImageObject = yield this.getSingleImage(key, publication, includeMimetype, thumb, table_name_enum_1.TableName.Goods);
|
|
406
|
-
if (getImageObject.validationResult && getImageObject.validationResult.success) {
|
|
406
|
+
if (getImageObject && getImageObject.validationResult && getImageObject.validationResult.success) {
|
|
407
407
|
if (getImageObject.resultObject) {
|
|
408
408
|
const document = getImageObject.resultObject;
|
|
409
409
|
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) {
|