Skip to content

Commit 33c847b

Browse files
@jotadevelopersergiohgz
authored andcommitted
fix: local storage requires package.json file for read, save and create all the time
1 parent fb91c59 commit 33c847b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/local-storage/src/local-fs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@ class LocalFS implements ILocalPackageManager {
141141
}
142142

143143
createPackage(name: string, value: any, cb: Function) {
144-
this._createFile(this._getStorage(name), this._convertToString(value), cb);
144+
this._createFile(this._getStorage(pkgFileName), this._convertToString(value), cb);
145145
}
146146

147147
savePackage(name: string, value: any, cb: Function) {
148-
this._writeFile(this._getStorage(name), this._convertToString(value), cb);
148+
this._writeFile(this._getStorage(pkgFileName), this._convertToString(value), cb);
149149
}
150150

151151
readPackage(name: string, cb: Function) {
152-
this._readStorageFile(this._getStorage(name)).then(function(res) {
152+
this._readStorageFile(this._getStorage(pkgFileName)).then(function(res) {
153153
try {
154154
const data: any = JSON.parse(res.toString('utf8'));
155155

0 commit comments

Comments
 (0)