Permalink
Browse files

[javascript mode] Fix variable-scope-restoration

  • Loading branch information...
1 parent 9236719 commit 275d6edfa82014a8bd79b167a507fe5f399ab485 @marijnh marijnh committed Sep 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 mode/javascript/javascript.js
@@ -175,8 +175,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
var defaultVars = {name: "this", next: {name: "arguments"}};
function pushcontext() {
- if (!cx.state.context) cx.state.localVars = defaultVars;
cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
+ cx.state.localVars = defaultVars;
}
function popcontext() {
cx.state.localVars = cx.state.context.vars;

0 comments on commit 275d6ed

Please sign in to comment.