Skip to content

Commit

Permalink
every => some and added additional check for leading comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang Su committed Jul 21, 2017
1 parent bb9c261 commit bbbb1cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util.js
Expand Up @@ -446,8 +446,9 @@ function hasClosureCompilerTypeCastComment(text, node) {
// Syntax example: var x = /** @type {string} */ (fruit);
return (
node.comments &&
node.comments.every(
node.comments.some(
comment =>
comment.leading &&
isBlockComment(comment) &&
comment.value.match(/^\*\s*@type\s*{[^}]+}\s*$/) &&
getNextNonSpaceNonCommentCharacter(text, comment) === "("
Expand Down

0 comments on commit bbbb1cf

Please sign in to comment.