<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’ve noticed this a lot and I’m wondering if there is anyway to fix it.<div class=""><br class=""></div><div class="">If I have this code:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">function findEnvironmentConfig(environment, config) {</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">   </span>if (!Array.isArray(environment)) {</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">             </span>environment = [environment];</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">   </span>} else {</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">               </span>// Clone the array so any mutations aren't received on the other end</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">           </span>environment = [...environment];</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</font></div><div class=""><font face="Menlo" class="">}</font></div></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">And try to code fold on the line "i<font face="Menlo" class="">f ( !Array.isArraty(environment)) {</font>“ then it ends up folding the entire function declaration.</div><div class=""><br class=""></div><div class="">How can I make this work as expected? I have a sneaky suspicion that this is a fatal flaw with TextMate.</div><div class=""><br class=""></div><div class="">Note, this works if  the “else {“ is on its own line.</div><div class=""><br class=""></div><div class="">Thanks!</div></body></html>