@cocreate/file-server 1.0.0 → 1.0.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.0.1](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.0...v1.0.1) (2022-12-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * if file.document ([f9d4e38](https://github.com/CoCreate-app/CoCreate-file-server/commit/f9d4e38b00bbdef7912bee6964797b8957ff189b))
7
+
1
8
  # 1.0.0 (2022-12-04)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/file-server",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A simple file-server component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "file-server",
package/src/index.js CHANGED
@@ -61,7 +61,7 @@ class CoCreateFileSystem {
61
61
  organization_id
62
62
  });
63
63
 
64
- if (!file || !file.document[0])
64
+ if (!file || !file.document || !file.document[0])
65
65
  return res.status(404).send(`${url} could not be found for ${organization_id} `);
66
66
 
67
67
  file = file.document[0]