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

don't assign to window.AMP_CONFIG if it exists #2910

Merged
merged 1 commit into from Apr 14, 2016

Conversation

erwinmombay
Copy link
Member

/cc @tdrl

will also need to update this internally for prod builds but this should fix local testing issue for now.

@erwinmombay
Copy link
Member Author

@cramforce PTAL

@@ -25,5 +25,5 @@ var config = {

exports.getTemplate = function() {
var configStr = JSON.stringify(config);
return `window.AMP_CONFIG=${configStr};/*AMP_CONFIG*/`;
return `window.AMP_CONFIG||(window.AMP_CONFIG=${configStr});/*AMP_CONFIG*/`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment here as to why we do the || pattern

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@cramforce
Copy link
Member

LGTM

@erwinmombay erwinmombay merged commit f990068 into ampproject:master Apr 14, 2016
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.

None yet

2 participants