lib/react/component/resolution.rb in isomorfeus-react-16.12.4 vs lib/react/component/resolution.rb in isomorfeus-react-16.12.5
- old
+ new
@@ -73,11 +73,11 @@
var component = null;
var component_type = typeof Opal.global[component_name];
if (component_type === "function" || component_type === "object") {
component = Opal.global[component_name];
} else {
- var modules = self.$class().$to_s().split("::");
- var modules_length = modules.length - 1;
+ var modules = self.$to_s().split("::");
+ var modules_length = modules.length;
var module;
var constant;
for (var i = modules_length; i > 0; i--) {
try {
module = modules.slice(0, i).join('::');