From 328982dbe50680c8bfdcc6d1cd10d50ed5948732 Mon Sep 17 00:00:00 2001 From: Cleon <18450687+meld-cp@users.noreply.github.com> Date: Sun, 8 Jan 2023 13:56:10 +1300 Subject: [PATCH] remove await $.render from docs --- docs/examples/invoice-builder.md | 2 +- docs/user-guide.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/examples/invoice-builder.md b/docs/examples/invoice-builder.md index 8924d56..8010d0f 100644 --- a/docs/examples/invoice-builder.md +++ b/docs/examples/invoice-builder.md @@ -109,7 +109,7 @@ const customer = customers.filter( e => e.id==inv.customer ).at(0); const template = $.blocks.at(0); // render the template passing in the customer and invoice -const html = await $.render( template, { customer, inv } ); +const html = $.render( template, { customer, inv } ); // create an html invoice file and open it in the default browser, from there it can be saved as a PDF await $.io.output( `inv ${inv.id}.html`, html, true ); diff --git a/docs/user-guide.md b/docs/user-guide.md index 2c128ab..ac94d6b 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -87,7 +87,7 @@ Here's an example: const mytemplate = 'Hello {{name}}'; const mydata = { name:'World' }; -const result = await $.render( mytemplate, mydata ); +const result = $.render( mytemplate, mydata ); await $.ui.message( result ); ``` @@ -109,7 +109,7 @@ The meld-build block to run: const template = $.blocks.at(0); // gets the first non-meld-build block in the note const data = { name:'John', message:'How are you?' }; -const result = await $.render( template, data ); +const result = $.render( template, data ); await $.ui.message( result ); ```