Fix copy-paste error in favorite selection comparison, giving TypeError.

This commit is contained in:
Nathan Gray 2015-07-10 17:44:21 +00:00
parent cd778e3c36
commit 3f3071241f

View File

@ -806,7 +806,7 @@ var AppJS = Class.extend(
typeof state[state_key][sub_key] === 'object' && typeof favorite.state[state_key][sub_key] === 'object') typeof state[state_key][sub_key] === 'object' && typeof favorite.state[state_key][sub_key] === 'object')
{ {
// Too deep to keep going, just string compare for perfect match // Too deep to keep going, just string compare for perfect match
if(state[state_key][sub_key].toJSON() === favorite.state[state_key][sub_key]) if(JSON.stringify(state[state_key][sub_key]) === JSON.stringify(favorite.state[state_key][sub_key]))
{ {
match_count++; match_count++;
} }