bruce-models 1.8.6 → 1.8.8
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/dist/bruce-models.es5.js +5 -3
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +5 -3
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/abstract-api.js +1 -1
- package/dist/lib/api/abstract-api.js.map +1 -1
- package/dist/lib/common/bruce-variable.js +3 -1
- package/dist/lib/common/bruce-variable.js.map +1 -1
- package/dist/lib/entity/entity-attachment.js +1 -1
- package/dist/lib/entity/entity-attachment.js.map +1 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -681,7 +681,7 @@ class AbstractApi {
|
|
|
681
681
|
}
|
|
682
682
|
else {
|
|
683
683
|
formData = new FormData();
|
|
684
|
-
if (params.formData) {
|
|
684
|
+
if (params === null || params === void 0 ? void 0 : params.formData) {
|
|
685
685
|
for (const key in params.formData) {
|
|
686
686
|
formData.append(key, params.formData[key]);
|
|
687
687
|
}
|
|
@@ -2002,7 +2002,9 @@ function getVariable(str) {
|
|
|
2002
2002
|
const end = str.indexOf("}");
|
|
2003
2003
|
if (end > -1) {
|
|
2004
2004
|
if (start < end) {
|
|
2005
|
-
|
|
2005
|
+
const path = str.substring(start + 2, end);
|
|
2006
|
+
const txt = str.substring(start, end + 1);
|
|
2007
|
+
return { path: path, text: txt };
|
|
2006
2008
|
}
|
|
2007
2009
|
}
|
|
2008
2010
|
}
|
|
@@ -3046,7 +3048,7 @@ var EntityAttachment;
|
|
|
3046
3048
|
throw ("Entity ID, Type ID, and File are required.");
|
|
3047
3049
|
}
|
|
3048
3050
|
const url = `entity/${entityId}/attachment/${typeId}`;
|
|
3049
|
-
const res = yield api.UPLOAD(url, file, reqParams);
|
|
3051
|
+
const res = yield api.UPLOAD(url, file, Api.PrepReqParams(reqParams));
|
|
3050
3052
|
api.Cache.RemoveByStartsWith(GetListCacheKey(entityId));
|
|
3051
3053
|
return {
|
|
3052
3054
|
attachment: res
|