Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit f69655c

Browse files
committed
Format logic to be more readable, clean up es-lint errors
1 parent 17475c3 commit f69655c

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

js/views/pageNavVw.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ module.exports = baseVw.extend({
176176
}
177177

178178
// History needs to be pruned
179-
if (tagsListLength > config.maxTagHistory) {
180-
tagsList = tagsList.slice(0, config.maxTagHistory);
179+
if (tagsListLength > window.config.maxTagHistory) {
180+
tagsList = tagsList.slice(0, window.config.maxTagHistory);
181181
}
182182

183183
// Update the history
@@ -207,13 +207,13 @@ module.exports = baseVw.extend({
207207
handlesList.splice(index, 1);
208208
}
209209

210-
// Tag goes to the beginning of the list
211-
handlesList.splice(0, 0, handleObj);
210+
// Tag goes to the beginning of the list
211+
handlesList.splice(0, 0, handleObj);
212212
}
213213

214214
// History needs to be pruned
215-
if (handlesListLength > config.maxHandleHistory) {
216-
handlesList = handlesList.slice(0, config.maxHandleHistory);
215+
if (handlesListLength > window.config.maxHandleHistory) {
216+
handlesList = handlesList.slice(0, window.config.maxHandleHistory);
217217
}
218218

219219
// Update the history
@@ -571,12 +571,14 @@ module.exports = baseVw.extend({
571571
if (!$target.hasClass('js-navAddressBar') && this.suggestionsVisible) {
572572
app.hideOverlay();
573573
this.hideSuggestions();
574-
} else if ($target.hasClass('js-navAddressBar') || !($target.hasClass('popMenu') ||
574+
} else if ($target.hasClass('js-navAddressBar') ||
575+
!(
576+
$target.hasClass('popMenu') ||
575577
$target.parents('.popMenu').length ||
576578
$target.is('[data-popmenu]') ||
577579
$target.parents('[data-popmenu]').length
578-
)) {
579-
580+
))
581+
{
580582
if (!this.suggestionsVisible) {
581583
app.hideOverlay();
582584
}
@@ -719,7 +721,7 @@ module.exports = baseVw.extend({
719721
itemUrl = '#home/products/' + (item.startsWith('#') ? item.substr(1, item.length) : item);
720722
} else if (type == 'handles') {
721723
itemTitle = item.handle + ' – ' + item.name;
722-
itemUrl = '#userPage/' + item.guid + '/store'
724+
itemUrl = '#userPage/' + item.guid + '/store';
723725
}
724726

725727
loadTemplate('./js/templates/pageNavSuggestionItem.html', function(loadedTemplate) {

js/views/userPageVw.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ module.exports = baseVw.extend({
395395
}
396396

397397
if(!self.options.ownPage && !self.skipNSFWmodal && self.model.get('page').profile.nsfw && !self.showNSFW){
398-
self.hideThisUser("nsfw");
398+
self.hideThisUser("nsfw");
399399
}
400400

401401
self.$el.find('#image-cropper').cropit({
@@ -488,7 +488,7 @@ module.exports = baseVw.extend({
488488
this.$el.find('.js-list4').html("");
489489
this.renderItem(hash);
490490
this.$obContainer.scrollTop(352);
491-
}else if(state === "listingOld") {
491+
}else if (state === "listingOld") {
492492
this.tabClick(this.$el.find(".js-storeTab"), this.$el.find(".js-item"));
493493
this.$obContainer.scrollTop(352);
494494
}else if(state === "listingNew"){
@@ -1552,7 +1552,6 @@ module.exports = baseVw.extend({
15521552
var $targ = $(e.target).closest('.js-addmoderator'),
15531553
self = this,
15541554
modList = {};
1555-
console.log($targ)
15561555

15571556
$targ.addClass('loading');
15581557

0 commit comments

Comments
 (0)