patched InjectorClient.js for compatibility above nodejs version 6.3.1 #938

Closed
wants to merge 1 commit into
from
@@ -105,10 +105,11 @@ InjectorClient.prototype._findNMInScope = function(funcHandle, cb) {
return prop.name == 'NativeModule';
});
- if (!NM.length)
- error = new Error('No NativeModule in target scope');
+ if (!NM.length) error = new Error('No NativeModule in target scope');
+
+ if(NM.length > 0) cb(error, NM[0].ref);
+ else cb(error, null);
- cb(error, NM[0].ref);
}.bind(this));
};