diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index 59041120..03ec4afd 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -15,6 +15,8 @@ import { const triangleUrl = require('../images/down-filled-triangle.svg'); const logoUrl = require('../images/p5js-logo-small.svg'); +const __process = (typeof global !== 'undefined' ? global : window).process; + class Nav extends React.PureComponent { constructor(props) { super(props); @@ -150,7 +152,7 @@ class Nav extends React.PureComponent { New - { (!this.props.project.owner || this.isUserOwner()) && + { __process.env.LOGIN_ENABLED && (!this.props.project.owner || this.isUserOwner()) &&
@@ -470,7 +472,7 @@ class Nav extends React.PureComponent {