Fix key not being set in bootstrapURLKeys (#948)

This commit is contained in:
Michael Diego 2020-09-23 01:14:00 +02:00 committed by GitHub
parent 685b12cd36
commit b25dea10fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,14 @@ export default (bootstrapURLKeys, heatmapLibrary) => {
}
if (!loader_) {
loader_ = new Loader({ ...bootstrapURLKeys, libraries });
const { key, ...restKeys } = bootstrapURLKeys;
loader_ = new Loader({
// need to keep key for backwards compatibility
apiKey: key || '',
...restKeys,
libraries,
});
}
const loadPromise = loader_.load().then(() => {