pathchain 1.0.58 → 1.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/maker.js +3 -7
- package/package.json +1 -1
package/maker.js
CHANGED
|
@@ -361,13 +361,6 @@ function link(target, prev, next, author, ancestor, format = 'MM DD YYYY HH:mm:S
|
|
|
361
361
|
|
|
362
362
|
if(target == "") return "The link must link something. Target can't be null.";
|
|
363
363
|
|
|
364
|
-
if(prev == ""){
|
|
365
|
-
if(next == "") return "The link should be connected to something. Prev and Next cannot be both null at the same time.";
|
|
366
|
-
}
|
|
367
|
-
if(next == ""){
|
|
368
|
-
if(prev == "") return "The link should be connected to something. Prev and Next cannot be both null at the same time.";
|
|
369
|
-
}
|
|
370
|
-
|
|
371
364
|
var author_folder = author;
|
|
372
365
|
if(author == ""){
|
|
373
366
|
author = author = pioneer(getter.getCurrentDate(), 'MM DD YYYY HH:mm:SSS [GMT]Z');
|
|
@@ -395,12 +388,15 @@ function link(target, prev, next, author, ancestor, format = 'MM DD YYYY HH:mm:S
|
|
|
395
388
|
|
|
396
389
|
// Find the target to figure out its nature (node, path or label)
|
|
397
390
|
if(checker.checkFile("files/" + author_folder + "nodes/" + target) == true){
|
|
391
|
+
target = 'nodes/' + target;
|
|
398
392
|
console.log("Target is a node")
|
|
399
393
|
}
|
|
400
394
|
if(checker.checkFile("files/" + author_folder + "paths/" + target) == true){
|
|
395
|
+
target = 'paths/' + target;
|
|
401
396
|
console.log("Target is a path")
|
|
402
397
|
}
|
|
403
398
|
if(checker.checkFile("files/" + author_folder + "labels/" + target) == true){
|
|
399
|
+
target = 'labels/' + target;
|
|
404
400
|
console.log("Target is a label")
|
|
405
401
|
}
|
|
406
402
|
|
package/package.json
CHANGED