From 1ea942dbd8d7bcc162489c78786fbc15e8ab598f Mon Sep 17 00:00:00 2001 From: "B. Arman Aksoy" Date: Thu, 3 Sep 2015 15:03:30 -0400 Subject: [PATCH] lint fix: better null comparison --- cycledash/static/js/examine/components/CommentBox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cycledash/static/js/examine/components/CommentBox.js b/cycledash/static/js/examine/components/CommentBox.js index 70b488e..a337c23 100644 --- a/cycledash/static/js/examine/components/CommentBox.js +++ b/cycledash/static/js/examine/components/CommentBox.js @@ -246,7 +246,8 @@ var VCFCommentViewer = React.createClass({ var markedDownText = marked(plainText); var user = this.props.user; - var authorName = user != null ? user.username : "Anonymous"; + var authorName = + (user !== undefined && user !== null) ? user.username : "Anonymous"; return (