Commit 538ece0f authored by Jacopo's avatar Jacopo

Replace underscore with lodash for ./app/assets/javascripts/mirrors

parent 98272880
import $ from 'jquery';
import _ from 'underscore';
import { debounce } from 'lodash';
import { __ } from '~/locale';
import Flash from '~/flash';
import axios from '~/lib/utils/axios_utils';
......@@ -62,7 +62,7 @@ export default class MirrorRepos {
}
registerUpdateListeners() {
this.debouncedUpdateUrl = _.debounce(() => this.updateUrl(), 200);
this.debouncedUpdateUrl = debounce(() => this.updateUrl(), 200);
this.$urlInput.on('input', () => this.debouncedUpdateUrl());
this.$protectedBranchesInput.on('change', () => this.updateProtectedBranches());
this.$table.on('click', '.js-delete-mirror', event => this.deleteMirror(event));
......
import $ from 'jquery';
import _ from 'underscore';
import { escape as esc } from 'lodash';
import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils';
import Flash from '~/flash';
......@@ -162,7 +162,7 @@ export default class SSHMirror {
const $fingerprintsList = this.$hostKeysInformation.find('.js-fingerprints-list');
let fingerprints = '';
sshHostKeys.fingerprints.forEach(fingerprint => {
const escFingerprints = _.escape(fingerprint.fingerprint);
const escFingerprints = esc(fingerprint.fingerprint);
fingerprints += `<code>${escFingerprints}</code>`;
});
......
---
title: Replace underscore with lodash for ./app/assets/javascripts/mirrors
merge_request: 24967
author: Jacopo Beschi @jacopo-beschi
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment