Skip to content

Commit

Permalink
Merge pull request #419 from not-an-aardvark/master
Browse files Browse the repository at this point in the history
Fix production bugs
  • Loading branch information
AlMcKinlay committed Nov 23, 2015
2 parents 024cb5b + 21a7d78 commit f582d1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/controllers/FlairController.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ module.exports = {
}
});

var newPFlair = _.get(req, "user.flair.ptrades.flair_css_class", "default");
var newsvFlair = _.get(req, "user.flair.svex.flair_css_class", "");
var newPFlair = _.get(req, "user.flair.ptrades.flair_css_class") || "default";
var newsvFlair = _.get(req, "user.flair.svex.flair_css_class") || "";
newsvFlair = newsvFlair.replace(/2/, "");
var promises = [];
promises.push(Reddit.setFlair(refreshToken, req.user.name, newPFlair, flairs.ptrades, "PokemonTrades"));
Expand Down
2 changes: 1 addition & 1 deletion assets/js/userCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = function ($scope, $filter, $location, UserFactory) {
$scope.userok.applyFlair = false;
$scope.userspin.applyFlair = true;
var flair = $scope.getFlair($scope.selectedFlair, $scope.flairs);
if ($scope.selectedFlair && $scope.canUserApply($scope.user, flair, $scope.flairs)) {
if ($scope.selectedFlair && $scope.canUserApply(flair)) {
io.socket.post("/flair/apply", {flair: $scope.selectedFlair, sub: flair.sub}, function (data, res) {
if (res.statusCode === 200) {
$scope.user.apps.push(data);
Expand Down

0 comments on commit f582d1b

Please sign in to comment.