feat: elide __FRSH_PROPS for no data or params (#33)

Minor size improvement.
This commit is contained in:
Luca Casonato
2021-06-12 00:23:59 +02:00
committed by GitHub
parent 3ad4a84b51
commit 18feea9c45
4 changed files with 25 additions and 15 deletions
+1 -4
View File
@@ -17,10 +17,7 @@ Deno.test("/ page prerender", async () => {
body,
`<script id="__FRSH_PROPS" type="application/json">`,
);
assertStringIncludes(
body,
`"params":{}`,
);
assert(!body.includes(`"params"`));
assertStringIncludes(
body,
`"data":[["home","Hello!"]]`,