I am trying to use Requirements::javascript to load in my .js files. For some reason silverstripe is loading all the files twice any time I use Requirements::javascript.
Has anyone else experienced this?
Here is my code:
function init() {
$themePath = 'themes/' . SSViewer::current_theme() . '/';
Requirements::javascript($themePath . 'js/JAIL.js');
parent::init();
}
I'm getting the same result when I try to use Requirements in page.php as well.
Thanks!