mikebronner / nova-map-marker-field

Provides an visual interface for editing latitude and longitude coordinates.
MIT License
131 stars 36 forks source link

TypeError: Cannot read property 'latitude' of null #37

Closed ahmedmaazin closed 4 years ago

ahmedmaazin commented 4 years ago

I'm getting the following error on the console with the new update of nova and the package. Tried setting a default value as well but still the same issue.

vendor.js?id=f9725df909a5af18907e:1 TypeError: Cannot read property 'latitude' of null

How I include the field within the Nova model is:

MapMarker::make("Location")->rules('required')->hideFromIndex()->help('Drag the map on to a location or try to search to get the location.'),

Notes:

version: "genealabs/nova-map-marker-field": "^0.1.16", nova: v3.3.2

Thanks in advance :) Please have a look.

mikebronner commented 4 years ago

I'll look into this over the coming week. Please feel free to submit a PR if you find the answer before me. :) Most likely something changed with the base field class in Nova 3.0.

ahmedmaazin commented 4 years ago

Sure, I'll have a look as well. Thank you for checking it out.

Hujairi commented 4 years ago

I'm getting a similar error, firefox console shows: TypeError: "this.field.value is null" setInitialValue domain/nova-api/scripts/nova-map-marker-field:1 and TypeError: "t.$refs.map is undefined" mounted domain/nova-api/scripts/nova-map-marker-field:1

Hujairi commented 4 years ago

I've updated nova to 3.4.1 and it's working now and I also tried: -npm install -npm run dev in the vendor folder, I don't know what actually solved it.

mikebronner commented 4 years ago

@Hujairi thanks for updating me on this. I will close this for now. If anyone is still getting these issues when using Nova 3.4.1+.