tslint: autofix of let -> const (#13033)

This commit is contained in:
Torkel Ödegaard
2018-08-26 17:14:40 +02:00
committed by GitHub
parent 8a99fa269d
commit 9b978b7203
167 changed files with 1077 additions and 1081 deletions

View File

@@ -8,10 +8,10 @@ export function infoPopover() {
template: '<i class="fa fa-info-circle"></i>',
transclude: true,
link: function(scope, elem, attrs, ctrl, transclude) {
let offset = attrs.offset || '0 -10px';
let position = attrs.position || 'right middle';
const offset = attrs.offset || '0 -10px';
const position = attrs.position || 'right middle';
let classes = 'drop-help drop-hide-out-of-bounds';
let openOn = 'hover';
const openOn = 'hover';
elem.addClass('gf-form-help-icon');
@@ -24,14 +24,14 @@ export function infoPopover() {
}
transclude(function(clone, newScope) {
let content = document.createElement('div');
const content = document.createElement('div');
content.className = 'markdown-html';
_.each(clone, node => {
content.appendChild(node);
});
let dropOptions = {
const dropOptions = {
target: elem[0],
content: content,
position: position,
@@ -52,9 +52,9 @@ export function infoPopover() {
// Create drop in next digest after directive content is rendered.
scope.$applyAsync(() => {
let drop = new Drop(dropOptions);
const drop = new Drop(dropOptions);
let unbind = scope.$on('$destroy', function() {
const unbind = scope.$on('$destroy', function() {
drop.destroy();
unbind();
});