Skip to content

Commit

Permalink
Fix the loader for files loaded before Opal
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Apr 30, 2018
1 parent 88e58e8 commit 1da033c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/opal/sprockets.rb
Expand Up @@ -36,7 +36,7 @@ def self.load_asset(name, _sprockets = :deprecated)

"if (typeof(Opal) !== 'undefined') { "\
"Opal.loaded(#{loaded.to_json}); "\
"if (typeof(OpalLoaded) === 'undefined') Opal.loaded(OpalLoaded); "\
"if (typeof(OpalLoaded) !== 'undefined') Opal.loaded(OpalLoaded); "\
"if (Opal.modules[#{name.to_json}]) Opal.load(#{name.to_json}); "\
"}"
end
Expand Down

0 comments on commit 1da033c

Please sign in to comment.