1 回答

TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超4個(gè)贊
在第 45 行,調(diào)用后有一個(gè)額外的右括號(hào)comment.author.id.equals(currentUser._id)。
<% if(currentUser && comment.author.id.equals(currentUser._id)) || currentUser && currentUser.isAdmin){ %>
<!-- ^^^^ -->
<a class="btn btn-xs btn-warning"
href="/components/<%= component._id %>/comments/<%= comment._id %>/edit">Edit</a>
<form class="delete-form" action="/components/<%= component._id %>/comments/<%= comment._id %>?_method=DELETE" method="post">
<input type="submit" class="btn btn-xs btn-danger" value="Delete">
</form>
</div>
<% } %>
錯(cuò)誤消息還建議使用ejs-lint來(lái)獲取更多有用的錯(cuò)誤消息。我建議嘗試一下。在這種情況下,它打?。?/p>
Unexpected token (45:81) in test.ejs
添加回答
舉報(bào)