Commit 8411e5a4 authored by Jose Vargas's avatar Jose Vargas

Replace underscore for lodash in releases

parent da0e5519
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { GlButton, GlFormInput, GlFormGroup } from '@gitlab/ui'; import { GlButton, GlFormInput, GlFormGroup } from '@gitlab/ui';
import _ from 'underscore'; import { escape as esc } from 'lodash';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import MarkdownField from '~/vue_shared/components/markdown/field.vue'; import MarkdownField from '~/vue_shared/components/markdown/field.vue';
import autofocusonshow from '~/vue_shared/directives/autofocusonshow'; import autofocusonshow from '~/vue_shared/directives/autofocusonshow';
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
'Changing a Release tag is only supported via Releases API. %{linkStart}More information%{linkEnd}', 'Changing a Release tag is only supported via Releases API. %{linkStart}More information%{linkEnd}',
), ),
{ {
linkStart: `<a href="${_.escape( linkStart: `<a href="${esc(
this.updateReleaseApiDocsPath, this.updateReleaseApiDocsPath,
)}" target="_blank" rel="noopener noreferrer">`, )}" target="_blank" rel="noopener noreferrer">`,
linkEnd: '</a>', linkEnd: '</a>',
......
<script> <script>
import _ from 'underscore'; import { isEmpty } from 'lodash';
import $ from 'jquery'; import $ from 'jquery';
import { slugify } from '~/lib/utils/text_utility'; import { slugify } from '~/lib/utils/text_utility';
import { getLocationHash } from '~/lib/utils/url_utility'; import { getLocationHash } from '~/lib/utils/url_utility';
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
return !this.glFeatures.releaseIssueSummary; return !this.glFeatures.releaseIssueSummary;
}, },
shouldRenderMilestoneInfo() { shouldRenderMilestoneInfo() {
return Boolean(this.glFeatures.releaseIssueSummary && !_.isEmpty(this.release.milestones)); return Boolean(this.glFeatures.releaseIssueSummary && !isEmpty(this.release.milestones));
}, },
}, },
......
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