Skip to content

Commit

Permalink
merge: only merge from non-empty samples
Browse files Browse the repository at this point in the history
  • Loading branch information
myfreeer committed May 26, 2020
1 parent f93f7ea commit 91d63f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mdn-merge-samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const mergeSamples = async (...basePath) => {
for (let k = 0; k < compareSamples.sampleArray.length; k++) {
let compareItem = compareSamples.sampleArray[k];
let item = currentSamples.map[compareItem.key];
if (!item || (item.isEmpty && !compareItem.isEmpty)) {
if (compareItem && !compareItem.isEmpty && (!item || item.isEmpty)) {
copyFilePromiseArray.push(copyAndMkdir(
path.join(compareItem.cwd, compareItem.path),
path.join(cwd, locale, compareItem.key))
Expand Down

0 comments on commit 91d63f7

Please sign in to comment.