Skip to content

Commit

Permalink
Fix JS error from Google Maps. Bump to 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikkel committed Feb 7, 2023
1 parent daa9ff4 commit 1baeee2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 3.0.2 - 2023-02-07

### Fixed
- Fixed a JS error `Loading the Google Maps JavaScript API without a callback is not supported`

## 3.0.1 - 2022-10-11

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vaersaagod/locate",
"description": "Harness the power of the Google Autocomplete API inside Craft. Adds an autocomplete search box to Craft entries.",
"type": "craft-plugin",
"version": "3.0.1",
"version": "3.0.2",
"keywords": [
"craft",
"cms",
Expand Down
1 change: 1 addition & 0 deletions src/fields/LocateField.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public function getInputHtml(mixed $value, ?ElementInterface $element = null): s
$apiUrl = UrlHelper::url('https://maps.googleapis.com/maps/api/js', [
'key' => $apiKey,
'libraries' => 'places',
'callback' => 'Function.prototype',
]);

$apiLanguage = App::parseEnv($settings->apiLanguage ?: $projectConfigSettings['apiLanguage'] ?? null);
Expand Down

0 comments on commit 1baeee2

Please sign in to comment.