Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

SSR outputs before the meta update completes #2

Open
acorcutt opened this issue Mar 18, 2020 · 0 comments
Open

SSR outputs before the meta update completes #2

acorcutt opened this issue Mar 18, 2020 · 0 comments

Comments

@acorcutt
Copy link

Hi,

Occasionally the server/pre render completes before all the meta tags have been injected, sometimes it might write all the tags, others just half or none, so I'm guessing the async is not working properly.

I've tried adding a short delay to the Head component and waiting for the dom to show a change but still no luck - any ideas?

function timeout(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}
await new BaseHead(data).createHead();
if (Build.isServer) {
    await timeout(500);
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant