Skip to content

Commit b25dea1

Browse files
Fix key not being set in bootstrapURLKeys (google-map-react#948)
1 parent 685b12c commit b25dea1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/loaders/google_map_loader.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@ export default (bootstrapURLKeys, heatmapLibrary) => {
5151
}
5252

5353
if (!loader_) {
54-
loader_ = new Loader({ ...bootstrapURLKeys, libraries });
54+
const { key, ...restKeys } = bootstrapURLKeys;
55+
56+
loader_ = new Loader({
57+
// need to keep key for backwards compatibility
58+
apiKey: key || '',
59+
...restKeys,
60+
libraries,
61+
});
5562
}
5663

5764
const loadPromise = loader_.load().then(() => {

0 commit comments

Comments
 (0)