vtb-appit 0.0.46 → 0.0.47

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.
@@ -42,6 +42,11 @@ class AppitBaseTransformer {
42
42
  return false;
43
43
  }
44
44
 
45
+ flightImages()
46
+ {
47
+ return false;
48
+ }
49
+
45
50
  places()
46
51
  {
47
52
  return false;
package/appit.js CHANGED
@@ -153,15 +153,17 @@ class Appit {
153
153
  async flightImages()
154
154
  {
155
155
  const object = this.transformer.flightImages();
156
- const workObject = JSON.parse(JSON.stringify(object));
157
- const images = (workObject.images.length) ? await this.getImages(workObject.images, 'original/lg') : {};
158
- delete workObject.images;
159
- delete workObject.object_id;
160
-
161
- let id = this.findId('flightImages', object.object_id);
162
- if(!id) {
163
- let model = await this.createFlightImage({...workObject, ...images, excursion_id: this.history.excursionId});
164
- this.history.flightImages[object.object_id] = model.data.id;
156
+ if(object) {
157
+ const workObject = JSON.parse(JSON.stringify(object));
158
+ const images = (workObject.images.length) ? await this.getImages(workObject.images, 'original/lg') : {};
159
+ delete workObject.images;
160
+ delete workObject.object_id;
161
+
162
+ let id = this.findId('flightImages', object.object_id);
163
+ if(!id) {
164
+ let model = await this.createFlightImage({...workObject, ...images, excursion_id: this.history.excursionId});
165
+ this.history.flightImages[object.object_id] = model.data.id;
166
+ }
165
167
  }
166
168
  }
167
169
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vtb-appit",
3
- "version": "0.0.46",
3
+ "version": "0.0.47",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {