Skip to content

Commit

Permalink
fixing error in handling of link messages when link order is not pres…
Browse files Browse the repository at this point in the history
…erved
  • Loading branch information
bmaranville committed Oct 21, 2022
1 parent 2488d1e commit 9e855a0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions esm/dataobjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export class DataObjects {
dtype = new DatatypeMessage(this.fh, offset).dtype;
}
catch (e) {
console.log('Attribute ' + name + ' type not implemented, set to null.');
console.warn('Attribute ' + name + ' type not implemented, set to null.');
return [name, null];
}

Expand Down Expand Up @@ -566,7 +566,8 @@ export class DataObjects {
//""" Retrieve links from symbol table message. """
let heap = new FractalHeap(this.fh, heap_address);
let btree;
if (order_btree_address != null) {
const ordered = (order_btree_address != null);
if (ordered) {
btree = new BTreeV2GroupOrders(this.fh, order_btree_address);
}
else {
Expand All @@ -576,7 +577,8 @@ export class DataObjects {
for (let record of btree.iter_records()) {
let data = heap.get_data(record.get("heapid"));
let [creationorder, item] = this._decode_link_msg(data, 0);
items.set(creationorder, item);
const key = (ordered) ? creationorder : item[0]; // name is item[0];
items.set(key, item);
}
let sorted_keys = Array.from(items.keys()).sort();
for (let key of sorted_keys) {
Expand Down

0 comments on commit 9e855a0

Please sign in to comment.