@secrecy/lib 1.61.2 → 1.61.3

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.
@@ -532,15 +532,16 @@ export class SecrecyCloudClient {
532
532
  }
533
533
  perNode = async (nodeId, publicKey) => {
534
534
  let node = nodesCache.get(nodeId);
535
- if (node === undefined || !('history' in node)) {
535
+ if (node === undefined || (node.type === 'FILE' && !('history' in node))) {
536
536
  await this.node({ id: nodeId });
537
537
  node = nodesCache.get(nodeId);
538
538
  if (node === undefined) {
539
539
  return null;
540
540
  }
541
541
  }
542
- if (!('history' in node) || node.history.length === 0) {
543
- throw new Error("Can't share a node whitout data!");
542
+ if (node.type === 'FILE' &&
543
+ (!('history' in node) || node.history.length === 0)) {
544
+ throw new Error("Can't share a node without data!");
544
545
  }
545
546
  const nameKey = node.access?.nameKey;
546
547
  return {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@secrecy/lib",
3
3
  "author": "Anonymize <anonymize@gmail.com>",
4
4
  "description": "Anonymize Secrecy Library",
5
- "version": "1.61.2",
5
+ "version": "1.61.3",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"