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

Commit 8766907

Browse files
authored
Merge pull request #62 from JaZo/bugfix/issue-44-typeerror-latitude
Fix "TypeError: Cannot create property 'latitude' on string"
2 parents dc62e1b + 76faf68 commit 8766907

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

dist/js/field.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/components/DetailField.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,17 @@
111111
112112
methods: {
113113
fill: function (formData) {
114-
formData.append(this.field.latitude, this.value.latitude);
115-
formData.append(this.field.longitude, this.value.longitude);
114+
formData.append(this.field.attribute, this.value || '');
116115
},
117116
118117
handleChange: function (value) {
119-
this.value.latitude = value.latitude;
120-
this.value.longitude = value.longitude;
118+
this.setValue(value.latitude, value.longitude);
121119
},
122120
123121
mapMoved: function (event) {
124122
let coordinates = event.target.getCenter();
125123
126-
this.value.latitude = coordinates.lat;
127-
this.value.longitude = coordinates.lng;
124+
this.setValue(coordinates.lat, coordinates.lng);
128125
},
129126
130127
setInitialValue: function () {

0 commit comments

Comments
 (0)