Skip to content

Commit

Permalink
REFACTOR: removes various assignments and superfluous params (#9699)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed May 8, 2020
1 parent 9d172ee commit 00a038d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/locales/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ I18n.toNumber = function(number, options) {
.toFixed(options.precision)
.toString(),
parts = string.split(this.SEPARATOR),
precision,
buffer = [],
formattedNumber;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/pretty-text/addon/oneboxer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 00a038d

Please sign in to comment.