fix: duplicate partial head tags (#1864)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { defineRoute } from "$fresh/src/server/defines.ts";
|
||||
import { RouteConfig } from "$fresh/server.ts";
|
||||
import { Head, Partial } from "$fresh/runtime.ts";
|
||||
import { Fader } from "../../islands/Fader.tsx";
|
||||
|
||||
export const config: RouteConfig = {
|
||||
skipAppWrapper: true,
|
||||
skipInheritedLayouts: true,
|
||||
};
|
||||
|
||||
export default defineRoute((req, ctx) => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Head merge duplicated</title>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
<style id="style-foo">{`p { color: green }`}</style>
|
||||
</Head>
|
||||
<Partial name="slot-1">
|
||||
<Fader>
|
||||
<h1>duplicated</h1>
|
||||
<p class="status-duplicated">duplicated content</p>
|
||||
</Fader>
|
||||
</Partial>
|
||||
</>
|
||||
);
|
||||
});
|
||||
@@ -8,6 +8,7 @@ export default function SlotDemo() {
|
||||
<title>Head merge</title>
|
||||
<meta name="foo" content="bar" />
|
||||
<meta property="og:foo" content="og value foo" />
|
||||
<style id="style-foo"></style>
|
||||
</Head>
|
||||
<Partial name="slot-1">
|
||||
<Fader>
|
||||
@@ -23,6 +24,15 @@ export default function SlotDemo() {
|
||||
update
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a
|
||||
class="duplicate-link"
|
||||
href="/head_merge/injected"
|
||||
f-partial="/head_merge/duplicate"
|
||||
>
|
||||
duplicate
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user