Skip to content

Commit a60b0e8

Browse files
committed
PB-390: Nested Page Builder content can fail to save when action is performed quickly
- Fix Google Maps error on upgrade content
1 parent 9754702 commit a60b0e8

File tree

1 file changed

+6
-1
lines changed
  • app/code/Magento/PageBuilder/view/base/web/js/utils

1 file changed

+6
-1
lines changed

app/code/Magento/PageBuilder/view/base/web/js/utils/map.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ define([
1818
var google = window.google || {},
1919

2020
/**
21-
* Generates a google map usuable latitude and longitude object
21+
* Generates a google map usable latitude and longitude object
2222
*
2323
* @param {Object} position
2424
* @return {google.maps.LatLng}
@@ -49,6 +49,11 @@ define([
4949
return;
5050
}
5151

52+
// If Google Maps isn't loaded don't try init the map, it won't work
53+
if (typeof google.maps === 'undefined') {
54+
return;
55+
}
56+
5257
/**
5358
* Just in case of a bad JSON that bypassed validation
5459
*/

0 commit comments

Comments
 (0)