diff options
author | isaacs <i@izs.me> | 2011-01-20 21:20:15 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-01-20 21:20:15 +0300 |
commit | 8c0853011c7fb63fd31ef94250be55a131f558de (patch) | |
tree | 6f8304d163ba2192a0bc63cbd24e2cc751c075a6 /lib/view.js | |
parent | a983c81e4b1c2e0e157d57b5de3433b409c426ff (diff) |
Handle invalid data coming back from registry.
Ugh.
Diffstat (limited to 'lib/view.js')
-rw-r--r-- | lib/view.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/view.js b/lib/view.js index d28de6c9c..a1e3de8f1 100644 --- a/lib/view.js +++ b/lib/view.js @@ -58,7 +58,11 @@ function view (args, silent, cb) { , error = null if (!args.length) args = [""] Object.keys(data.versions).forEach(function (v) { - data.versions[v] = readJson.processJson(data.versions[v]) + try { + data.versions[v] = readJson.processJson(data.versions[v]) + } catch (ex) { + delete data.versions[v] + } if (semver.satisfies(v, version)) args.forEach(function (args) { results.push(showFields(data, data.versions[v], args)) }) |