pathchain 1.1.19 → 1.1.20
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/getter.js +3 -3
- package/package.json +1 -1
package/getter.js
CHANGED
|
@@ -165,7 +165,7 @@ function getObj(xaddress) {
|
|
|
165
165
|
// const labelProto = pb(fs.readFileSync('node_modules/pathchain/proto/label.proto'));
|
|
166
166
|
const filePath = `files/${xaddress}`;
|
|
167
167
|
|
|
168
|
-
var splitted_address =
|
|
168
|
+
var splitted_address = xaddress.split("/");
|
|
169
169
|
console.log("Splitted address: ", splitted_target);
|
|
170
170
|
obj_type = splitted_address[splitted_address.length - 2];
|
|
171
171
|
console.log("Object type: ", obj_type);
|
|
@@ -242,7 +242,7 @@ function getPathchainObj(xpath, xauthor = '') {
|
|
|
242
242
|
|
|
243
243
|
var current_link = this.getObj(pathObj.head);
|
|
244
244
|
console.log("Head link", current_link);
|
|
245
|
-
|
|
245
|
+
|
|
246
246
|
var current_obj = this.getObj(current_link.target);
|
|
247
247
|
console.log("First object", current_obj);
|
|
248
248
|
|
|
@@ -252,7 +252,7 @@ function getPathchainObj(xpath, xauthor = '') {
|
|
|
252
252
|
obj_list.push(current_obj);
|
|
253
253
|
current_link = this.getObj(current_link.prev);
|
|
254
254
|
current_obj = this.getObj(current_link.target);
|
|
255
|
-
}
|
|
255
|
+
}
|
|
256
256
|
// Get link -> get link.target
|
|
257
257
|
return current_link;
|
|
258
258
|
} catch (err) {
|
package/package.json
CHANGED