Catch empty owner as array, which would also cause problems

This commit is contained in:
Nathan Gray 2015-12-08 22:17:44 +00:00
parent cbf2497d58
commit d00eaa9834

View File

@ -1682,7 +1682,9 @@ app.classes.calendar = AppJS.extend(
this.state_update_in_progress = true;
// Sanitize owner so it's always an array
if(state.state.owner === null || !state.state.owner)
if(state.state.owner === null || !state.state.owner ||
(typeof state.state.owner.length != 'undefined' && state.state.owner.length == 0)
)
{
state.state.owner = undefined;
}