Skip to content

Commit

Permalink
Merge pull request #1168 from sahilbansal17/sahilbansal11/edit-action…
Browse files Browse the repository at this point in the history
…s-replace-var

feat(Refactor): Replace `var` with `let`/`const` in EditAction.js
  • Loading branch information
TildaDares authored Oct 15, 2022
2 parents a7eeb1a + ca2dd42 commit 83001cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/edit/actions/EditAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ L.EditAction = L.Toolbar2.Action.extend({
},

_createIcon(toolbar, container, args) {
var iconOptions = this.options.toolbarIcon;
var className = iconOptions.className;
var edit = this._overlay.editing;
const iconOptions = this.options.toolbarIcon;
const className = iconOptions.className;
const edit = this._overlay.editing;

this.toolbar = toolbar;
this._icon = L.DomUtil.create('li', '', container);
Expand Down Expand Up @@ -58,7 +58,7 @@ L.EditAction = L.Toolbar2.Action.extend({

L.DomEvent.on(this._link, 'click', this.enable, this);
L.DomEvent.on(this._overlay, 'update', () => {
var match = this._link.innerHTML.match(/xlink:href="#restore"/);
const match = this._link.innerHTML.match(/xlink:href="#restore"/);
if (match && match.length === 1) { this._enableAction(); }
});

Expand All @@ -71,7 +71,7 @@ L.EditAction = L.Toolbar2.Action.extend({
return;
}

var el = document.createElement('div');
let el = document.createElement('div');
el.id = 'iconset';
el.setAttribute('hidden', 'hidden');
el.innerHTML = new L.ToolbarIconSet().render();
Expand Down

0 comments on commit 83001cc

Please sign in to comment.