From 4ca31fd2cf393f51300fa25b8555458cd9ecebf2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 5 Mar 2018 09:03:54 +0900 Subject: [PATCH] Fix bug --- src/web/app/desktop/views/components/post-form.vue | 10 +++++++++- src/web/app/mobile/views/components/post-form.vue | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/web/app/desktop/views/components/post-form.vue b/src/web/app/desktop/views/components/post-form.vue index 6e334e7ca..22ed52b39 100644 --- a/src/web/app/desktop/views/components/post-form.vue +++ b/src/web/app/desktop/views/components/post-form.vue @@ -219,7 +219,15 @@ export default Vue.extend({ reply_id: this.reply ? this.reply.id : undefined, repost_id: this.repost ? this.repost.id : undefined, poll: this.poll ? (this.$refs.poll as any).get() : undefined, - geo: this.geo, + geo: this.geo ? { + latitude: this.geo.latitude, + longitude: this.geo.longitude, + altitude: this.geo.altitude, + accuracy: this.geo.accuracy, + altitudeAccuracy: this.geo.altitudeAccuracy, + heading: isNaN(this.geo.heading) ? null : this.geo.heading, + speed: this.geo.speed, + } : null }).then(data => { this.clear(); this.deleteDraft(); diff --git a/src/web/app/mobile/views/components/post-form.vue b/src/web/app/mobile/views/components/post-form.vue index 559a6c1c4..35e581f31 100644 --- a/src/web/app/mobile/views/components/post-form.vue +++ b/src/web/app/mobile/views/components/post-form.vue @@ -113,7 +113,15 @@ export default Vue.extend({ media_ids: this.files.length > 0 ? this.files.map(f => f.id) : undefined, reply_id: this.reply ? this.reply.id : undefined, poll: this.poll ? (this.$refs.poll as any).get() : undefined, - geo: this.geo, + geo: this.geo ? { + latitude: this.geo.latitude, + longitude: this.geo.longitude, + altitude: this.geo.altitude, + accuracy: this.geo.accuracy, + altitudeAccuracy: this.geo.altitudeAccuracy, + heading: isNaN(this.geo.heading) ? null : this.geo.heading, + speed: this.geo.speed, + } : null, via_mobile: viaMobile }).then(data => { this.$emit('post');