Skip to content

Commit 1a45a26

Browse files
Update main.js
On my first attempts to run this with my projects layers (note: not using rarity delimiter), the code would error with the stack trace that follows. This change made my code work, but this PR is to point out the issue more than to propose that this is the perfect solution. ```UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined at cleanDna (/Users/christopherfoley/nft/hashlips_art_engine/src/main.js:54:25) at /Users/christopherfoley/nft/hashlips_art_engine/src/main.js:151:22```
1 parent 951c19d commit 1a45a26

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const getRarityWeight = (_str) => {
4545
nameWithoutExtension.split(rarityDelimiter).pop()
4646
);
4747
if (isNaN(nameWithoutWeight)) {
48-
nameWithoutWeight = 0;
48+
nameWithoutWeight = 1;
4949
}
5050
return nameWithoutWeight;
5151
};

0 commit comments

Comments
 (0)