Commit 850c41ea authored by Alex Beregszaszi's avatar Alex Beregszaszi

Avoid duplicates in importHints

parent d443252c
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment