我正在使用 haml 编写以下代码。我的 index.html.haml 文件中基本上有一堆嵌套的 if-else 语句。但是,我不断收到以下代码的语法错误。
- if current_user
:javascript
window.is_logined_in = true;
window.currentUserJSON = #{@current_user_json};
//Getting syntax error for the line below
- if window.currentUserJSON.user.following_count == 293 && window.currentUserJSON.user.answer_count == 276
window.complete_orientation = true;
- else
window.complete_orientation = false;
- else
:javascript
window.is_logined_in = false;
如何修改我的代码以解决此语法错误?