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

Avoid duplicates in importHints

parent d443252c
...@@ -223,7 +223,11 @@ function Compiler (editor, handleGithubCall) { ...@@ -223,7 +223,11 @@ function Compiler (editor, handleGithubCall) {
if (importFilePath.startsWith('./')) { if (importFilePath.startsWith('./')) {
importFilePath = importFilePath.slice(2) importFilePath = importFilePath.slice(2)
} }
importHints.push(importFilePath)
// 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) { while (importHints.length > 0) {
......
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