diff --git a/migrations/20130208_idLists_to_typeIds.js b/migrations/20130208_idLists_to_typeIds.js index 2b1311c636..f22dc25be7 100644 --- a/migrations/20130208_idLists_to_typeIds.js +++ b/migrations/20130208_idLists_to_typeIds.js @@ -3,6 +3,7 @@ // We could just delete user.idLists, since it's re-created on refresh. However, users's first refresh will scare them // since everything will dissappear - second refresh will bring everything back. db.users.find().forEach(function(user){ + if (!user.idLists) return; db.users.update( {_id:user._id}, { diff --git a/src/app/browser.coffee b/src/app/browser.coffee index edf8734a10..628bd64718 100644 --- a/src/app/browser.coffee +++ b/src/app/browser.coffee @@ -4,8 +4,8 @@ module.exports.resetDom = (model) -> window.DERBY.app.dom.clear() window.DERBY.app.view.render(model) model.fn '_tnl', '_user.stats.lvl', (lvl) -> (lvl*100)/5 - _.each ['habit', 'daily', 'todo', 'reward'], (type) -> - model.refList "_#{type}List", "_user.tasks", "_user.{type}Ids" +# _.each ['habit', 'daily', 'todo', 'reward'], (type) -> +# model.refList "_#{type}List", "_user.tasks", "_user.{type}Ids" module.exports.app = (appExports, model) -> loadJavaScripts(model)