#246 fix TypeError: Cannot read property 'length' of undefined

#246 fix TypeError: Cannot read property 'length' of undefined when trying to save custom fields

https://github.com/cliftonc/calipso/issues/246