@k3000/store 1.2.0 → 1.2.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.
Files changed (2) hide show
  1. package/architect.mjs +5 -1
  2. package/package.json +1 -1
package/architect.mjs CHANGED
@@ -277,7 +277,11 @@ export class Entity {
277
277
 
278
278
  readFileSync(name) {
279
279
 
280
- return readFileSync(this.#storage.bufferDir + (this.#position + this.#positionSet[name]))
280
+ const path = this.#storage.bufferDir + (this.#position + this.#positionSet[name])
281
+
282
+ if (!existsSync(path)) return Buffer.alloc(0)
283
+
284
+ return readFileSync(path)
281
285
  }
282
286
 
283
287
  buffer(value, name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k3000/store",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "storage",
5
5
  "main": "generator.mjs",
6
6
  "scripts": {