@angular/google-maps 15.2.0-next.2 → 15.2.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2020/google-maps.mjs
CHANGED
|
@@ -39,6 +39,12 @@ class MapEventManager {
|
|
|
39
39
|
const listener = target.addListener(name, (event) => {
|
|
40
40
|
this._ngZone.run(() => observer.next(event));
|
|
41
41
|
});
|
|
42
|
+
// If there's an error when initializing the Maps API (e.g. a wrong API key), it will
|
|
43
|
+
// return a dummy object that returns `undefined` from `addListener` (see #26514).
|
|
44
|
+
if (!listener) {
|
|
45
|
+
observer.complete();
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
42
48
|
this._listeners.push(listener);
|
|
43
49
|
return () => listener.remove();
|
|
44
50
|
});
|