diff --git a/docs/guides/sprig.md b/docs/guides/sprig.md
index ffddeee..72ee6fe 100644
--- a/docs/guides/sprig.md
+++ b/docs/guides/sprig.md
@@ -76,9 +76,10 @@ It is important that the map ID in the [`googleMaps.init` method](/javascript/go
{# When the map is reloaded by Sprig #}
{% if sprig.isRequest %}
-
+ {% endset %}
+ {% do sprig.registerJs(js) %}
{% endif %}
```
@@ -90,11 +91,12 @@ The `init` method also allows for an optional [callback method](/javascript/goog
```twig
{% if sprig.isRequest %}
-
+ {% endset %}
+ {% do sprig.registerJs(js) %}
{% endif %}
```