Detect if module
This commit is contained in:
parent
64bf3174d8
commit
51c47b9f98
|
@ -115,7 +115,7 @@ mcopy.arduino.connect = function (callback) {
|
|||
});
|
||||
};
|
||||
|
||||
if (typeof module !== 'undefined') {
|
||||
if (typeof module !== 'undefined' && module.parent) {
|
||||
module.exports = function (cfg) {
|
||||
mcopy.cfg = cfg;
|
||||
return mcopy.arduino;
|
||||
|
|
Loading…
Reference in New Issue