tuain-form-manager 1.1.17 → 1.1.18

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.
Files changed (2) hide show
  1. package/lib/form.js +4 -1
  2. package/package.json +1 -1
package/lib/form.js CHANGED
@@ -116,7 +116,10 @@ class Form {
116
116
  }
117
117
 
118
118
  getImmutableElement(name) {
119
- const { value, signature } = this._responseData.immutableData[name];
119
+ if (!this._responseData?.immutableData) {
120
+ return null;
121
+ }
122
+ const { value, signature } = this._responseData?.immutableData?.[name] ?? {};
120
123
  const content = JSON.stringify({ name, value });
121
124
  const signatureKey = this._requestContext.signatureKey ?? this._requestContext.deviceKey ?? '1234567890';
122
125
  const checkSignature = crypto.createHmac('sha256', signatureKey).update(content).digest('hex');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuain-form-manager",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "description": "Component library to perform operations on Tuain Development Framework forms to interchange information on web or mobile applications based on the data interchange of abstract forms making trnasformation on the data upon actions required on both sides (front and back)",
5
5
  "main": "index.js",
6
6
  "scripts": {