summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/templates.md4
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/templates.md b/docs/templates.md
index 778b8e2d..c050889f 100644
--- a/docs/templates.md
+++ b/docs/templates.md
@@ -14,7 +14,7 @@ This function can be helpful for debugging values when creating templates.
<details>
<summary>Syntax:</summary>
- <code>{{#dumpObject}}<i>&lt;object&gt;</i>{{/dumpObject}}</code>
+ <code>{{dumpObject <i>object</i>}}</code>
* _`object`_ <br>
The object to convert.
@@ -23,7 +23,7 @@ This function can be helpful for debugging values when creating templates.
<summary>Example:</summary>
```handlebars
- <pre>{{#dumpObject}}{{.}}{{/dumpObject}}</pre>
+ <pre>{{dumpObject .}}</pre>
```
Output:
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index 789f0942..9e0bc8ed 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -134,8 +134,8 @@ class AnkiTemplateRenderer {
// Template helpers
- _dumpObject(context, options) {
- const dump = JSON.stringify(options.fn(context), null, 4);
+ _dumpObject(context, object) {
+ const dump = JSON.stringify(object, null, 4);
return this._escape(dump);
}