Skip to content

Commit 32b9d7e

Browse files
@jotadevelopersergiohgz
authored andcommitted
fix: restore closure
Regresion, issue was introduced verdaccio/local-storage@3c915c7
1 parent 96302e5 commit 32b9d7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ export default class LocalFS implements ILocalFSPackageManager {
8282
let locked = false;
8383
const self = this;
8484
// callback that cleans up lock first
85-
const unLockCallback = (lockError: Error) => {
85+
const unLockCallback = function(lockError: Error) {
8686
const _args = arguments;
8787

8888
if (locked) {
8989
self._unlockJSON(pkgFileName, () => {
9090
// ignore any error from the unlock
9191
if (lockError !== null) {
92-
this.logger.trace(
92+
self.logger.trace(
9393
{
9494
name,
9595
lockError
@@ -101,7 +101,7 @@ export default class LocalFS implements ILocalFSPackageManager {
101101
onEnd.apply(lockError, _args);
102102
});
103103
} else {
104-
this.logger.trace({ name }, '[local-storage/updatePackage/unLockCallback] file: @{name} has been updated');
104+
self.logger.trace({ name }, '[local-storage/updatePackage/unLockCallback] file: @{name} has been updated');
105105

106106
onEnd(..._args);
107107
}

0 commit comments

Comments
 (0)