ded/script.js

If a script is loaded twice, only one callback is called

Closed this issue · 0 comments

When a script is loaded twice in a row, only one of the callbacks is returned.

$script('test.js', function() {
  console.log("hi")
})    
$script('test.js', function() {
  console.log("hi")
})

The output is only one "hi". If I instead set the second one with a timeout of 1 second, both callbacks are called. This is majorly broken.