Skip to content

Commit

Permalink
fix .match[] of undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
Paweł Stefański committed Nov 8, 2018
1 parent e0457eb commit b78703d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npm-gui",
"version": "1.0.1",
"version": "1.0.3",
"description": "npm-gui",
"main": "index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion server/actions/mapDependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function mapNpmDependency(name, dependency, version, required) {
const installed = (dependency && dependency.version) || null;
let wanted = version ? uniqueOrNull(version.wanted, [installed]) : null;
const latest = version ? uniqueOrNull(version.latest, [installed, wanted]) : null;
if (!installed && !wanted) {
if (!installed && !wanted && required) {
[wanted] = required.match(/\d.+/);
}
return {
Expand Down

0 comments on commit b78703d

Please sign in to comment.