Avoid potential infinite loop due to logic evaluation order

This commit is contained in:
Nathan Gray 2016-02-10 00:35:54 +00:00
parent 26f4c6556b
commit 37be48c772

View File

@ -2882,7 +2882,7 @@ app.classes.calendar = AppJS.extend(
for(var day in updated_days) for(var day in updated_days)
{ {
// Might be split by user, so we have to check that too // Might be split by user, so we have to check that too
for(var i = 0; i < typeof state.owner == 'object' ? state.owner.length : 1; i++) for(var i = 0; i < (typeof state.owner == 'object' ? state.owner.length : 1); i++)
{ {
var owner = multiple_owner ? state.owner[i] : state.owner; var owner = multiple_owner ? state.owner[i] : state.owner;
var cache_id = app.classes.calendar._daywise_cache_id(day, owner); var cache_id = app.classes.calendar._daywise_cache_id(day, owner);