Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-03 12:07:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-03 12:07:54 +0300
commit87ef501eacd66d7166183d20d84e33de022f7002 (patch)
treefa4e0f41e00a4b6aeb035530be4b5473f51b7a3d /app/assets/javascripts/u2f
parentf321e51f46bcb628c3e96a44b5ebf3bb1c4033ab (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/u2f')
-rw-r--r--app/assets/javascripts/u2f/authenticate.js6
-rw-r--r--app/assets/javascripts/u2f/register.js4
2 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/u2f/authenticate.js b/app/assets/javascripts/u2f/authenticate.js
index abfc81e681e..6244df1180e 100644
--- a/app/assets/javascripts/u2f/authenticate.js
+++ b/app/assets/javascripts/u2f/authenticate.js
@@ -1,5 +1,5 @@
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));
}
diff --git a/app/assets/javascripts/u2f/register.js b/app/assets/javascripts/u2f/register.js
index 43c814c8070..f5a422727ad 100644
--- a/app/assets/javascripts/u2f/register.js
+++ b/app/assets/javascripts/u2f/register.js
@@ -1,5 +1,5 @@
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));
}