Allowing commentstream to be rendered outside of embed.

This commit is contained in:
David Jay
2016-11-18 12:19:58 -05:00
parent 95cd83c09e
commit da07b737b2
@@ -61,8 +61,8 @@ class CommentStream extends Component {
// Set up messaging between embedded Iframe an parent component
// Using recommended Pym init code which violates .eslint standards
const pym = new Pym.Child({polling: 100});
const path = /https?\:\/\/([^?]+)/.exec(pym.parentUrl)[1];
this.props.getStream(path);
const path = /https?\:\/\/([^?]+)/.exec(pym.parentUrl);
this.props.getStream(path && path[1] || window.location);
}
render () {