mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
remove all changes from eslint --fix
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import content from '../content/index';
|
||||
|
||||
module.exports = function (user, req, cb, analytics) {
|
||||
module.exports = function(user, req, cb, analytics) {
|
||||
var analyticsData, item, ref, ref1;
|
||||
item = (ref = user.purchased.plan) !== null ? (ref1 = ref.mysteryItems) !== null ? ref1.shift() : void 0 : void 0;
|
||||
item = (ref = user.purchased.plan) != null ? (ref1 = ref.mysteryItems) != null ? ref1.shift() : void 0 : void 0;
|
||||
if (!item) {
|
||||
return typeof cb === 'function' ? cb({
|
||||
return typeof cb === "function" ? cb({
|
||||
code: 400,
|
||||
message: 'Empty'
|
||||
message: "Empty"
|
||||
}) : void 0;
|
||||
}
|
||||
item = content.gear.flat[item];
|
||||
user.items.gear.owned[item.key] = true;
|
||||
if (typeof user.markModified === 'function') {
|
||||
if (typeof user.markModified === "function") {
|
||||
user.markModified('purchased.plan.mysteryItems');
|
||||
}
|
||||
item.notificationType = 'Mystery';
|
||||
@@ -22,11 +22,11 @@ module.exports = function (user, req, cb, analytics) {
|
||||
acquireMethod: 'Subscriber',
|
||||
category: 'behavior'
|
||||
};
|
||||
if (analytics !== null) {
|
||||
if (analytics != null) {
|
||||
analytics.track('open mystery item', analyticsData);
|
||||
}
|
||||
if (typeof window !== 'undefined') {
|
||||
(user._tmp !== null ? user._tmp : user._tmp = {}).drop = item;
|
||||
(user._tmp != null ? user._tmp : user._tmp = {}).drop = item;
|
||||
}
|
||||
return typeof cb === 'function' ? cb(null, user.items.gear.owned) : void 0;
|
||||
return typeof cb === "function" ? cb(null, user.items.gear.owned) : void 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user