diff --git a/app/views/editor/level/thangs/AddThangsView.coffee b/app/views/editor/level/thangs/AddThangsView.coffee index a88b66cce..be00f3f37 100644 --- a/app/views/editor/level/thangs/AddThangsView.coffee +++ b/app/views/editor/level/thangs/AddThangsView.coffee @@ -33,7 +33,7 @@ module.exports = class AddThangsView extends CocoView models = @supermodel.getModels(ThangType) thangTypes = _.uniq models, false, (thangType) -> thangType.get('original') - thangTypes = _.reject thangTypes, (thangType) -> thangType.get('kind') in ['Mark', 'Item'] + thangTypes = _.reject thangTypes, (thangType) -> thangType.get('kind') in ['Mark', 'Item', undefined] groupMap = {} for thangType in thangTypes kind = thangType.get('kind') diff --git a/app/views/editor/level/thangs/ThangsTabView.coffee b/app/views/editor/level/thangs/ThangsTabView.coffee index 35162b674..fcf0ce8e0 100644 --- a/app/views/editor/level/thangs/ThangsTabView.coffee +++ b/app/views/editor/level/thangs/ThangsTabView.coffee @@ -82,7 +82,7 @@ module.exports = class ThangsTabView extends CocoView return context unless @supermodel.finished() thangTypes = (thangType.attributes for thangType in @supermodel.getModels(ThangType)) thangTypes = _.uniq thangTypes, false, 'original' - thangTypes = _.reject thangTypes, kind: 'Mark' + thangTypes = _.reject thangTypes, (tt) -> tt.kind in ['Mark', undefined] groupMap = {} for thangType in thangTypes groupMap[thangType.kind] ?= [] diff --git a/server/routes/auth.coffee b/server/routes/auth.coffee index fee2f2644..539260d15 100644 --- a/server/routes/auth.coffee +++ b/server/routes/auth.coffee @@ -15,13 +15,13 @@ module.exports.setup = (app) -> authentication.use(new LocalStrategy( (username, password, done) -> - + # kind of a hacky way to make it possible for iPads to 'log in' with their unique device id if username.length is 36 and '@' not in username # must be an identifier for vendor q = { iosIdentifierForVendor: username } else q = { emailLower: username.toLowerCase() } - + User.findOne(q).exec((err, user) -> return done(err) if err return done(null, false, {message: 'not found', property: 'email'}) if not user