comparison plugins/dataforms.js @ 82:06495f77a74c

Fix a problem with dataforms.
author Sonny Piers <sonny.piers@gmail.com>
date Tue, 07 Feb 2012 18:46:04 +0100
parents 7500bc048dbc
children bfa3c003fc1d
comparison
equal deleted inserted replaced
81:7500bc048dbc 82:06495f77a74c
125 if (fields) 125 if (fields)
126 form.reported = fields 126 form.reported = fields
127 } 127 }
128 128
129 var itemsList = x.getElementsByTagNameNS(Lightstring.ns['dataforms'], 'item'); 129 var itemsList = x.getElementsByTagNameNS(Lightstring.ns['dataforms'], 'item');
130 if (itemsList) { 130 if (itemsList.length) {
131 var fields = parseFields(itemsList[0].getElementsByTagNameNS(Lightstring.ns['dataforms'], 'fields')); 131 var fields = parseFields(itemsList[0].getElementsByTagNameNS(Lightstring.ns['dataforms'], 'fields'));
132 if (fields) 132 if (fields)
133 form.items = fields; 133 form.items = fields;
134 } 134 }
135 135