Skip to content

Commit f22d525

Browse files
committed
chore: update example
1 parent 41770a6 commit f22d525

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

examples/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<script
3737
nonce="caffe67d7b989af3a1c7f4a1a6c79bd9fb2b4eb0"
3838
type="text/javascript"
39-
src="../dist/index.dev.js"
39+
src="../dist/index.umd.js"
4040
></script>
4141

4242
<script
@@ -77,12 +77,21 @@
7777
}
7878
});
7979

80+
// An error is thrown when instantiating loader with new options
81+
try {
82+
new google.maps.plugins.loader.Loader({apiKey: 'foo'});
83+
} catch (e) {
84+
console.log(e.message)
85+
}
86+
87+
// The loader is a singleton and new loaders will resolve with the old
8088
const anotherLoader = new google.maps.plugins.loader.Loader(
8189
loader.options
8290
);
8391
anotherLoader.load().then(() => {
8492
console.log("another loader was used with same options");
8593
});
94+
8695
</script>
8796
</head>
8897

0 commit comments

Comments
 (0)