Commit 097ac6ce authored by Mark Florian's avatar Mark Florian

Use computed prop for help path

This avoids the help path being calculated at script execution time,
before the component has even been instantiated (which may never even
happen).
parent 37fafa08
......@@ -2,7 +2,7 @@
import { GlButton, GlModal } from '@gitlab/ui';
import MarkdownField from '~/vue_shared/components/markdown/field.vue';
import { s__ } from '~/locale';
import { helpPagePath } from '~/lib/utils/help_page_utility';
import { helpPagePath } from '~/helpers/help_page_helper';
export default {
name: 'DesignReplyForm',
......@@ -61,6 +61,9 @@ export default {
? s__('DesignManagement|Comment')
: s__('DesignManagement|Save comment');
},
markdownDocsPath() {
return helpPagePath('user/markdown');
},
},
mounted() {
this.focusInput();
......@@ -80,9 +83,6 @@ export default {
this.$refs.textarea.focus();
},
},
helpLinks: {
markdownDocsPath: helpPagePath('user/markdown'),
},
};
</script>
......@@ -93,7 +93,7 @@ export default {
:can-attach-file="false"
:enable-autocomplete="true"
:textarea-value="value"
:markdown-docs-path="$options.helpLinks.markdownDocsPath"
:markdown-docs-path="markdownDocsPath"
class="bordered-box"
>
<template #textarea>
......
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