eslint: enforce use of const when variable not modified
This commit is contained in:
@@ -1020,7 +1020,7 @@ export const setContext = function (elem) {
|
||||
|
||||
// Disable other elements
|
||||
const parentsUntil = getParentsUntil(elem, '#svgcontent');
|
||||
let siblings = [];
|
||||
const siblings = [];
|
||||
parentsUntil.forEach(function (parent) {
|
||||
const elements = Array.prototype.filter.call(parent.parentNode.children, function(child){
|
||||
return child !== parent;
|
||||
|
||||
@@ -209,7 +209,7 @@ class SvgCanvas {
|
||||
return this._storage.has(element) && this._storage.get(element).has(key);
|
||||
},
|
||||
remove: function (element, key) {
|
||||
let ret = this._storage.get(element).delete(key);
|
||||
const ret = this._storage.get(element).delete(key);
|
||||
if (!this._storage.get(element).size === 0) {
|
||||
this._storage.delete(element);
|
||||
}
|
||||
@@ -555,7 +555,7 @@ class SvgCanvas {
|
||||
|
||||
const restoreRefElems = function (elem) {
|
||||
// Look for missing reference elements, restore any found
|
||||
let attrs = {};
|
||||
const attrs = {};
|
||||
refAttrs.forEach(function (item, _) {
|
||||
attrs[item] = elem.getAttribute(item);
|
||||
});
|
||||
|
||||
@@ -576,7 +576,7 @@ function groupBBFix(selected) {
|
||||
let ret; let copy;
|
||||
|
||||
if (ref) {
|
||||
let elements = [];
|
||||
const elements = [];
|
||||
Array.prototype.forEach.call(ref.children, function (el) {
|
||||
const elem = el.cloneNode(true);
|
||||
elem.setAttribute('visibility', 'hidden');
|
||||
|
||||
Reference in New Issue
Block a user