{nodejs,bowerjs}-project-mode: stop error if json is malformed

This commit is contained in:
Henrik Lissner 2016-06-06 19:40:14 -04:00
parent 329d20a618
commit 30fa9219e8
2 changed files with 2 additions and 2 deletions

View file

@ -128,7 +128,7 @@
(package-file (f-expand "package.json" project-path)) (package-file (f-expand "package.json" project-path))
deps) deps)
(awhen (and (not hash) (f-exists? package-file) (awhen (and (not hash) (f-exists? package-file)
(json-read-file package-file)) (ignore-errors (json-read-file package-file)))
(puthash project-path it npm-conf))) (puthash project-path it npm-conf)))
t)) t))

View file

@ -79,7 +79,7 @@
(package-file (f-expand "bower.json" project-path)) (package-file (f-expand "bower.json" project-path))
deps) deps)
(awhen (and (not hash) (f-exists? package-file) (awhen (and (not hash) (f-exists? package-file)
(json-read-file package-file)) (ignore-errors (json-read-file package-file)))
(puthash project-path it bower-conf))) (puthash project-path it bower-conf)))
t)) t))