Skip to content

Commit

Permalink
fix: remove some unneeded checks (#1182)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRuf authored and juanpicado committed Jan 14, 2019
1 parent 064f7cf commit ab56d75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/storage.js
Expand Up @@ -411,7 +411,7 @@ class Storage implements IStorageHandler {
const self = this;
const upLinks = [];

if (!packageInfo || packageInfo === null) {
if (!packageInfo) {
exists = false;
packageInfo = generatePackageTemplate(name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/up-storage.js
Expand Up @@ -540,7 +540,7 @@ class ProxyStorage implements IProxy {
//
if (this.proxy === false) {
headers['X-Forwarded-For'] = (
req && req.headers['x-forwarded-for']
req.headers['x-forwarded-for']
? req.headers['x-forwarded-for'] + ', '
: ''
) + req.connection.remoteAddress;
Expand Down

0 comments on commit ab56d75

Please sign in to comment.