Commit 2c87c84d authored by Kushal Pandya's avatar Kushal Pandya

Merge branch...

Merge branch '196655-replace-underscore-with-lodash-for-app-assets-javascripts-behaviors' into 'master'

Replace underscore with lodash or native JS for ./app/assets/javascripts/behaviors

Closes #196655

See merge request gitlab-org/gitlab!25059
parents 843ca90c 3ae49ac3
/* eslint-disable class-methods-use-this */
import { Mark } from 'tiptap';
import _ from 'underscore';
import { escape as esc } from 'lodash';
// Transforms generated HTML back to GFM for Banzai::Filter::MarkdownFilter
export default class InlineHTML extends Mark {
......@@ -35,7 +35,7 @@ export default class InlineHTML extends Mark {
mixable: true,
open(state, mark) {
return `<${mark.attrs.tag}${
mark.attrs.title ? ` title="${state.esc(_.escape(mark.attrs.title))}"` : ''
mark.attrs.title ? ` title="${state.esc(esc(mark.attrs.title))}"` : ''
}>`;
},
close(state, mark) {
......
import $ from 'jquery';
import _ from 'underscore';
import { isEmpty } from 'lodash';
import '../commons/bootstrap';
// Requires Input behavior
......@@ -23,10 +23,10 @@ $.fn.requiresInput = function requiresInput() {
function requireInput() {
// Collect the input values of *all* required fields
const values = _.map($(fieldSelector, $form), field => field.value);
const values = Array.from($(fieldSelector, $form)).map(field => field.value);
// Disable the button if any required fields are empty
if (values.length && _.some(values, _.isEmpty)) {
if (values.length && values.some(isEmpty)) {
$button.disable();
} else {
$button.enable();
......
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