Browse Source

fix multiple forward declarations

Vladislav Folts 11 years ago
parent
commit
9c953b5b4b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/scope.js

+ 4 - 1
src/scope.js

@@ -50,7 +50,10 @@ var Scope = Class.extend({
         }
     },
     findSymbol: function(ident){return this.__symbols[ident];},
-    addUnresolved: function(id){this.__unresolved.push(id);},
+    addUnresolved: function(id){
+        if (this.__unresolved.indexOf(id) == -1)
+            this.__unresolved.push(id);
+    },
     unresolved: function(){return this.__unresolved;}
 });