Avoid duplicates in importHints

pull/1/head
Alex Beregszaszi 8 years ago
parent d443252c8c
commit 850c41ea8d
  1. 4
      src/app/compiler.js

@ -223,9 +223,13 @@ function Compiler (editor, handleGithubCall) {
if (importFilePath.startsWith('./')) {
importFilePath = importFilePath.slice(2)
}
// FIXME: should be using includes or sets, but there's also browser compatibility..
if (importHints.indexOf(importFilePath) === -1) {
importHints.push(importFilePath)
}
}
}
while (importHints.length > 0) {
var m = importHints.pop()
if (m in files) {

Loading…
Cancel
Save