Skip to content

Commit 88727df

Browse files
author
Alexander
authored
Merge pull request #8 from yukal/dev
Dev
2 parents 2368908 + 27e0d39 commit 88727df

File tree

4 files changed

+633
-6380
lines changed

4 files changed

+633
-6380
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [10.x, 12.x, 14.x]
19+
node-version: [12.x, 14.x, 16.x]
2020

2121
steps:
2222
- uses: actions/checkout@v2

lib/gulp-json-loader.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,7 @@ const loadImportsAsync = (ctx, imports, cachedData) => {
8181
const options = { ctx, imports, cachedData, pocket: {} };
8282

8383
loadImportsRecursively(options, (error, pocket) => {
84-
if (error !== null) {
85-
reject(error);
86-
return;
87-
}
88-
89-
resolve(pocket);
84+
error !== null ? reject(error) : resolve(pocket);
9085
});
9186

9287
}
@@ -136,7 +131,7 @@ const loadImportsRecursively = async (options, callback) => {
136131
options.idx = idx + 1;
137132
loadImportsRecursively(options, callback);
138133

139-
} else if (callback !== undefined) {
134+
} else if (callback instanceof Function) {
140135
callback(null, pocket);
141136
}
142137
}

0 commit comments

Comments
 (0)