Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using sink.appendToBody breaks fastrender #23

Open
macrozone opened this issue Oct 14, 2018 · 1 comment
Open

using sink.appendToBody breaks fastrender #23

macrozone opened this issue Oct 14, 2018 · 1 comment

Comments

@macrozone
Copy link

reproduction:

FastRender.onPageLoad(async sink => {
    sink.appendToBody('<p>test</p>');
})

will result in [object Object]<p>test</p> instead of <script type="text/inject-data">%7B%22fast-render-data....><p>test</p>

The problem is probably in inject-data

@macrozone
Copy link
Author

workaround:

import { InjectData } from 'meteor/staringatlights:inject-data';

InjectData.disableInjection = true;

FastRender.onPageLoad(async sink => {
... 

 const payload = `<script type="text/inject-data">${InjectData.encode(
          sink.request.headers._injectPayload
        )}</script>`;


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant