Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

Commit

Permalink
Fix maps loaded check
Browse files Browse the repository at this point in the history
  • Loading branch information
Andries Smit authored and Andries Smit committed Apr 30, 2019
1 parent 90fa179 commit 7d5c46e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "maps",
"widgetName": "Maps",
"version": "1.0.3",
"version": "1.0.4",
"description": "Show locations on Google Maps",
"copyright": "Mendix BV",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/GoogleApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const googleApiWrapper = (script: string) => <P extends GoogleMapsProps>(wrapped
}

componentDidMount() {
if (typeof window.google === "undefined") {
if (typeof window.google === "undefined" || (window.google && typeof google.maps === "undefined")) {
this.loadScript(script);
} else {
this.setState({ scriptsLoaded: true });
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="Maps" version="1.0.3" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="Maps" version="1.0.4" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="Maps.xml"/>
</widgetFiles>
Expand Down

0 comments on commit 7d5c46e

Please sign in to comment.