Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Small update to make the library more resilient to invalid JSON Form …
Browse files Browse the repository at this point in the history
…objects.
  • Loading branch information
tidoust committed Mar 15, 2012
1 parent 471034f commit 88bb4b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jsonform.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ formFragment.prototype.buildOneElement = function (elt,options) {
}

// Retrieve the template to use for the form element
if (!elt.template) {
if (!elt.template && elt.type && jsonform.elementTypes[elt.type]) {
elt.template = jsonform.elementTypes[elt.type].template;
if (jsonform.elementTypes[elt.type].fieldtemplate) {
elt.template = jsonform.fieldTemplate(elt.template);
Expand Down

0 comments on commit 88bb4b6

Please sign in to comment.