project-booster-vue 9.45.0 → 9.45.1
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/package.json
CHANGED
|
@@ -188,7 +188,11 @@ export default defineComponent({
|
|
|
188
188
|
props.payload.viewModel.defaultValue?.zipcode?.path,
|
|
189
189
|
) || null;
|
|
190
190
|
|
|
191
|
-
const convertToTypeOf = (typedVar: string, input: any): string | number => {
|
|
191
|
+
const convertToTypeOf = (typedVar: string, input: any): string | number | null => {
|
|
192
|
+
if (!input) {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
|
|
192
196
|
switch (typedVar) {
|
|
193
197
|
case 'string':
|
|
194
198
|
return input.toString();
|
|
@@ -202,11 +206,13 @@ export default defineComponent({
|
|
|
202
206
|
};
|
|
203
207
|
|
|
204
208
|
const metadata = props.payload.viewModel.metadata;
|
|
205
|
-
let sendingMetadata: any;
|
|
209
|
+
let sendingMetadata: any = {};
|
|
206
210
|
|
|
207
|
-
metadata
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
if (metadata) {
|
|
212
|
+
metadata.forEach((meta: TrezorInterface) => {
|
|
213
|
+
sendingMetadata[meta.attribut] = convertToTypeOf(meta.type, getAnswerValue(meta.answerCode, meta.path)) || null;
|
|
214
|
+
});
|
|
215
|
+
}
|
|
210
216
|
|
|
211
217
|
let formData = ref<any>({
|
|
212
218
|
values: {
|