vtb-appit 0.0.97 → 0.0.98

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/appit.js +2 -1
  2. package/package.json +1 -1
package/appit.js CHANGED
@@ -423,7 +423,8 @@ class Appit {
423
423
  if(!id) {
424
424
  let model = await this.createDocument(documents[i]);
425
425
  console.log('documents', model);
426
- this.history.documents[documents[i].object_id] = model.data.id;
426
+ if(typeof model === 'object' && model.data && model.data.id)
427
+ this.history.documents[documents[i].object_id] = model.data.id;
427
428
  } else {
428
429
  await this.updateDocument(id, documents[i]);
429
430
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vtb-appit",
3
- "version": "0.0.97",
3
+ "version": "0.0.98",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {},