Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Closes #276, related to #259. Generating a resource with no properties

will no longer throw.
  • Loading branch information...
commit 5576e9fb577deb536fa97a51af357d1735513a5c 1 parent 9df9550
@larzconwell larzconwell authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  templates/resource/model.ejs
View
2  templates/resource/model.ejs
@@ -2,7 +2,7 @@ var <%= names.constructor.singular %> = function () {
this.defineProperties({
<% for (var i in properties) { -%>
-<% if (properties[i].name !== 'id') { -%>
+<% if (properties[i].name && properties[i].name !== 'id') { -%>
<% if (i === 'default') { -%>
<%= properties[i].name %>: {type: '<%= properties[i].type %>', required: true},
<% } else { -%>
Please sign in to comment.
Something went wrong with that request. Please try again.