diff --git a/mode/erlang/erlang.js b/mode/erlang/erlang.js
index <HASH>..<HASH> 100644
--- a/mode/erlang/erlang.js
+++ b/mode/erlang/erlang.js
@@ -339,7 +339,7 @@ CodeMirror.defineMode("erlang", function(cmCfg) {
   }
 
   function lookahead(stream) {
-    let m = stream.match(/^\s*([^\s%])/, false)
+    var m = stream.match(/^\s*([^\s%])/, false)
     return m ? m[1] : "";
   }
Don't use let in mode script