Detect if module

This commit is contained in:
Matt 2016-04-12 02:19:35 -04:00
parent 64bf3174d8
commit 51c47b9f98
1 changed files with 1 additions and 1 deletions

View File

@ -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;