Skip to content

Commit c4885f7

Browse files
committed
Fix to be compatible with old old node.
1 parent 309dc81 commit c4885f7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/install-ozw.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ function build(gypArgs, cb) {
142142

143143
function copyFiles() {
144144
fsextra.copySync(tempPath + '/ozw/open-zwave-master/config', installPath + '/config');
145-
fsextra.copySync(tempPath + '/ozw/open-zwave-master/cpp/src', installPath + '/include', { filter: (src, dest) => {
145+
fsextra.copySync(tempPath + '/ozw/open-zwave-master/cpp/src', installPath + '/include', { filter: function (src, dest) {
146146
var stat = fs.statSync(src);
147147
return (stat && stat.isDirectory()) || !src.match(/^.*\.(?!h)[^.]+$/);
148-
} });
148+
}});
149149
fsextra.copySync(tempPath + '/ozw/open-zwave-master/build/Release', installPath + '/bin');
150150
}
151151

@@ -220,7 +220,7 @@ module.exports = function(opts) {
220220
fs.createReadStream( tempPath + "/ozw.zip")
221221
.pipe(unzip.Extract({ path: tempPath + '/ozw' }))
222222
.on('close', function() {
223-
var sources = readdirSyncRecursive(tempPath + '/ozw/open-zwave-master/cpp').map((f) => f.replace(tempPath + '/ozw/open-zwave-master/cpp/', ''));
223+
var sources = readdirSyncRecursive(tempPath + '/ozw/open-zwave-master/cpp').map(function (f) { return f.replace(tempPath + '/ozw/open-zwave-master/cpp/', ''); });
224224

225225

226226
sources = sources.filter(function(f) {

0 commit comments

Comments
 (0)