models -> items bug

This commit is contained in:
bkfox
2022-03-26 16:36:16 +01:00
parent fb665aff5d
commit af7289614f
8 changed files with 23 additions and 12845 deletions

View File

@ -67,7 +67,7 @@ export default class Model {
* @param {Array} items: array of data
* @param {Object} options: options passed down to all model instances
*/
static fromList(items, options=null) {
static fromList(items, options={}) {
return items ? items.map(d => new this(d, options)) : []
}