Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix(scripts): fix jsonify bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Feb 9, 2020
1 parent dd6c0f7 commit 39f4869
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{{- $typeitArr = $typeitArr | append (slice $val) -}}
{{- end -}}
<script>
{{- printf "window.typeitArr=%s;" (jsonify $typeitArr) | safeJS -}}
{{- printf "window.typeitArr=%s;" ($typeitArr | jsonify) | safeJS -}}
</script>
{{- end -}}

Expand Down Expand Up @@ -138,7 +138,7 @@
{{- $mermaid = delimit (slice $mermaid $mermaidInit) "" -}}
{{- $mermaid | safeHTML -}}
<script>
{{- printf "window.mermaidMap=%s;" (jsonify .Scratch.Get "mermaidMap") | safeJS -}}
{{- printf "window.mermaidMap=%s;" (.Scratch.Get "mermaidMap" | jsonify) | safeJS -}}
</script>
{{- end -}}

Expand Down Expand Up @@ -184,7 +184,7 @@
{{- end -}}
{{- $countdown | safeHTML -}}
<script>
{{- printf "window.countdownMap=%s;" (jsonify .Scratch.Get "countdownMap") | safeJS -}}
{{- printf "window.countdownMap=%s;" (.Scratch.Get "countdownMap" | jsonify) | safeJS -}}
</script>
{{- end -}}

Expand Down

0 comments on commit 39f4869

Please sign in to comment.