Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #62 from JaZo/bugfix/issue-44-typeerror-latitude
Browse files Browse the repository at this point in the history
Fix "TypeError: Cannot create property 'latitude' on string"
  • Loading branch information
mikebronner authored Mar 7, 2022
2 parents dc62e1b + 76faf68 commit 8766907
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions resources/js/components/DetailField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,17 @@
methods: {
fill: function (formData) {
formData.append(this.field.latitude, this.value.latitude);
formData.append(this.field.longitude, this.value.longitude);
formData.append(this.field.attribute, this.value || '');
},
handleChange: function (value) {
this.value.latitude = value.latitude;
this.value.longitude = value.longitude;
this.setValue(value.latitude, value.longitude);
},
mapMoved: function (event) {
let coordinates = event.target.getCenter();
this.value.latitude = coordinates.lat;
this.value.longitude = coordinates.lng;
this.setValue(coordinates.lat, coordinates.lng);
},
setInitialValue: function () {
Expand Down

0 comments on commit 8766907

Please sign in to comment.