@nsnanocat/util 2.6.0 → 2.6.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/package.json +1 -1
- package/polyfill/Storage.js +4 -4
package/package.json
CHANGED
package/polyfill/Storage.js
CHANGED
|
@@ -286,8 +286,8 @@ export class Storage {
|
|
|
286
286
|
*/
|
|
287
287
|
static #loaddata = dataFile => {
|
|
288
288
|
if ($app === "Node.js") {
|
|
289
|
-
this.fs = this.fs ? this.fs : require("
|
|
290
|
-
this.path = this.path ? this.path : require("
|
|
289
|
+
this.fs = this.fs ? this.fs : require("fs");
|
|
290
|
+
this.path = this.path ? this.path : require("path");
|
|
291
291
|
const curDirDataFilePath = this.path.resolve(dataFile);
|
|
292
292
|
const rootDirDataFilePath = this.path.resolve(process.cwd(), dataFile);
|
|
293
293
|
const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath);
|
|
@@ -313,8 +313,8 @@ export class Storage {
|
|
|
313
313
|
*/
|
|
314
314
|
static #writedata = (dataFile = this.dataFile) => {
|
|
315
315
|
if ($app === "Node.js") {
|
|
316
|
-
this.fs = this.fs ? this.fs : require("
|
|
317
|
-
this.path = this.path ? this.path : require("
|
|
316
|
+
this.fs = this.fs ? this.fs : require("fs");
|
|
317
|
+
this.path = this.path ? this.path : require("path");
|
|
318
318
|
const curDirDataFilePath = this.path.resolve(dataFile);
|
|
319
319
|
const rootDirDataFilePath = this.path.resolve(process.cwd(), dataFile);
|
|
320
320
|
const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath);
|