Permalink
Browse files

Don't bail project load on missing stylesheets. Refs #913.

  • Loading branch information...
1 parent 989c519 commit 5630ec77c5d3a4f10f930a041ecbc5fcbca1f597 Will White committed Nov 16, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 models/Project.server.bones
@@ -188,7 +188,11 @@ function loadProject(model, callback) {
}
},
function(err, stylesheets) {
- if (err) throw err;
+ if (err && err.code === 'ENOENT') {
+ stylesheets = _(stylesheets).compact();
+ } else if (err) {
+ return this(err);
+ }
// Embed stylesheet contents at the `Stylesheet` key.
object.Stylesheet = _(stylesheets).map(function(file) {

0 comments on commit 5630ec7

Please sign in to comment.