Skip to content

Commit 4bb5337

Browse files
committed
Better check for duplicates
1 parent c4c87a1 commit 4bb5337

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
else
2323
echo "No output file"
2424
fi
25+
2526
file_to_file:
2627
runs-on: ubuntu-latest
2728
name: Test just copying the file

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ try
2727
return;
2828

2929
const filenameWithoutExtension = filename.substring(0, filename.length - ".json".length);
30-
if(outputJson[filenameWithoutExtension] !== undefined)
30+
if(!outputJson.hasOwnProperty(filenameWithoutExtension))
3131
{
3232
core.error(filenameWithoutExtension + " is already defined (in " + inFile + ")");
3333
return;

0 commit comments

Comments
 (0)