Skip to content

Commit

Permalink
use newline as DNA delimiter, update error check about layer names co…
Browse files Browse the repository at this point in the history
…ntaining the DNA delimeter
  • Loading branch information
RyanLucchese committed Mar 16, 2023
1 parent d8ee279 commit 71d5ced
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ctx.imageSmoothingEnabled = format.smoothing;
var metadataList = [];
var attributesList = [];
var dnaList = new Set();
const DNA_DELIMITER = "-";
const DNA_DELIMITER = "\n";
const HashlipsGiffer = require(`${basePath}/modules/HashlipsGiffer.js`);

let hashlipsGiffer = null;
Expand Down Expand Up @@ -73,8 +73,8 @@ const getElements = (path) => {
.readdirSync(path)
.filter((item) => !/(^|\/)\.[^\/\.]/g.test(item))
.map((i, index) => {
if (i.includes("-")) {
throw new Error(`layer name can not contain dashes, please fix: ${i}`);
if (i.includes(DNA_DELIMITER)) {
throw new Error(`layer name can not contain ${DNA_DELIMITER}, please fix: ${i}`);
}
return {
id: index,
Expand Down

0 comments on commit 71d5ced

Please sign in to comment.