Skip to content

Only use strftime if in browser environment, for use in Node.js #46

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomblanchard
Copy link

I am using liquid.js in a Node.js environment and am getting the document is not defined error when compiling templates due to strftime relying on the DOM, document doesn't exist in Node.js, my changes make is so strftime is used only when window is present (i.e. in a browser environment).

@mattmccray
Copy link
Owner

Does this still build correctly and pass all the tests?

@tomblanchard
Copy link
Author

@mattmccray Sure does.

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

Successfully merging this pull request may close these issues.

2 participants