Commit 43cfd849 authored by Mike Greiling's avatar Mike Greiling

Merge branch '196640-replace-underscore-with-lodash-for-app-assets-javascripts-u2f' into 'master'

Replace underscore from lodash in ./uf2

Closes #196640

See merge request gitlab-org/gitlab!25695
parents 1a2d039b 75cdabe9
import $ from 'jquery';
import _ from 'underscore';
import { template as lodashTemplate, omit } from 'lodash';
import importU2FLibrary from './util';
import U2FError from './error';
......@@ -37,7 +37,7 @@ export default class U2FAuthenticate {
// Note: The server library fixes this behaviour in (unreleased) version 1.0.0.
// This can be removed once we upgrade.
// https://github.com/castle/ruby-u2f/commit/103f428071a81cd3d5f80c2e77d522d5029946a4
this.signRequests = u2fParams.sign_requests.map(request => _(request).omit('challenge'));
this.signRequests = u2fParams.sign_requests.map(request => omit(request, 'challenge'));
this.templates = {
setup: '#js-authenticate-u2f-setup',
......@@ -74,7 +74,7 @@ export default class U2FAuthenticate {
renderTemplate(name, params) {
const templateString = $(this.templates[name]).html();
const template = _.template(templateString);
const template = lodashTemplate(templateString);
return this.container.html(template(params));
}
......
import $ from 'jquery';
import _ from 'underscore';
import { template as lodashTemplate } from 'lodash';
import importU2FLibrary from './util';
import U2FError from './error';
......@@ -59,7 +59,7 @@ export default class U2FRegister {
renderTemplate(name, params) {
const templateString = $(this.templates[name]).html();
const template = _.template(templateString);
const template = lodashTemplate(templateString);
return this.container.html(template(params));
}
......
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