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

$global broken when using template.stream() #381

Closed
GenaANTG opened this issue Oct 15, 2016 · 3 comments
Closed

$global broken when using template.stream() #381

GenaANTG opened this issue Oct 15, 2016 · 3 comments
Assignees

Comments

@GenaANTG
Copy link

GenaANTG commented Oct 15, 2016

Hi there!
This code doesn't work now. Before he worked fine.

let HomePage = require('./home.marko');
let response = {
    $global: {
        active: 'home',
        logged: logged,
        moment: moment,
    },
    currentPage: currentPage,
};
HomePage.stream(response).pipe(res);

I have a layout and his part(home.marko). I load a part of layout and give him the data for rendering, but nothing.

In a layout i tried to print data: ${out.global.active}. What i doing wrong? Previously everything worked fine.

@patrick-steele-idem
Copy link
Contributor

Looks like a bug. I am investigating and should have an update soon. Thanks for opening an issue!

@patrick-steele-idem patrick-steele-idem self-assigned this Oct 15, 2016
@patrick-steele-idem patrick-steele-idem changed the title Question: How to work with the global variables? $global broken when using template.stream() Oct 15, 2016
@patrick-steele-idem
Copy link
Contributor

Should be fixed now. We were missing a test case that should have caught an internal API change. New version published with fix: marko@3.11.7

Thanks, again.

@GenaANTG
Copy link
Author

@patrick-steele-idem Thanks a lot!

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

2 participants