]> git.parisson.com Git - pdf.js.git/commitdiff
Don't add a dependency to the array if the array already contains it
authorJulian Viereck <julian.viereck@gmail.com>
Sat, 1 Oct 2011 15:15:25 +0000 (17:15 +0200)
committerJulian Viereck <julian.viereck@gmail.com>
Sat, 1 Oct 2011 15:15:25 +0000 (17:15 +0200)
pdf.js

diff --git a/pdf.js b/pdf.js
index 42f272e6844cff12edd104a5c897882e8898a4ff..9f8e4c1c163a9e8430d7e634d5cdf5f84713d019 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4173,7 +4173,10 @@ var PartialEvaluator = (function() {
         fnArray.push("dependency");
         argsArray.push(depList);
         for (var i = 0; i < depList.length; i++) {
-          dependency.push(depList[i]);
+          var dep = depList[i];
+          if (dependency.indexOf(dep) == -1) {
+            dependency.push(depList[i]);
+          }
         }
       }