File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
records_management/static/src/js Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,14 @@ odoo.define('records_management.map_widget', function (require) {
1212 // Clear previous content and add map container
1313 this . $el . html ( '<div class="map_container"></div>' ) ;
1414
15- var latitude = this . recordData ?. [ this . options ?. latitude_field ] ?? undefined ;
16- var longitude = this . recordData ?. [ this . options ?. longitude_field ] ?? undefined ;
17-
1815 if ( ! this . recordData || ! this . options ) {
1916 this . $ ( '.map_container' ) . html ( '<span>Invalid configuration: record data or options missing.</span>' ) ;
2017 return ;
2118 }
2219
20+ var latitude = this . recordData [ this . options . latitude_field ] ;
21+ var longitude = this . recordData [ this . options . longitude_field ] ;
22+
2323 var hasLatitude = ! ! latitude ;
2424 var hasLongitude = ! ! longitude ;
2525 var hasGoogle = typeof google !== 'undefined' ;
You can’t perform that action at this time.
0 commit comments