REFACTOR: removes various assignments and superfluous params (#9699)

This commit is contained in:
Joffrey JAFFEUX 2020-05-08 09:19:48 +02:00 committed by GitHub
parent 9d172eeaa5
commit 00a038d646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 7 deletions

View File

@ -452,14 +452,13 @@ const TopicTrackingState = EmberObject.extend({
}
let categoryId = category ? get(category, "id") : null;
let categoryName = category ? get(category, "name") : null;
if (name === "new") {
return this.countNew(categoryId);
} else if (name === "unread") {
return this.countUnread(categoryId);
} else {
categoryName = name.split("/")[1];
const categoryName = name.split("/")[1];
if (categoryName) {
return this.countCategory(categoryId);
}

View File

@ -197,7 +197,6 @@ I18n.toNumber = function(number, options) {
.toFixed(options.precision)
.toString(),
parts = string.split(this.SEPARATOR),
precision,
buffer = [],
formattedNumber;

View File

@ -225,7 +225,7 @@ export function setup(helper) {
token = state.push("text", "", 0);
token.content = content;
token = state.push("link_close", "a", -1);
state.push("link_close", "a", -1);
return true;
}
});

View File

@ -66,7 +66,7 @@ function rule(state, startLine, endLine) {
token.map = [startLine, state.line];
token.children = [];
token = state.push("paragraph_close", "p", -1);
state.push("paragraph_close", "p", -1);
state.parentType = oldParentType;
return true;

View File

@ -78,7 +78,7 @@ function paragraph(state, startLine /*, endLine*/) {
// CUSTOM
token.leading_space = hasLeadingSpace;
token = state.push("paragraph_close", "p", -1);
state.push("paragraph_close", "p", -1);
state.parentType = oldParentType;
return true;

View File

@ -78,7 +78,7 @@ function loadNext(ajax) {
let $html = $(html);
setLocalCache(normalize(url), $html);
$elem.replaceWith($html);
applySquareGenericOnebox($html, normalize(url));
applySquareGenericOnebox($html);
},
result => {
if (result && result.jqXHR && result.jqXHR.status === 429) {