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 @@ ...@@ -2,7 +2,7 @@
import { GlButton, GlModal } from '@gitlab/ui'; import { GlButton, GlModal } from '@gitlab/ui';
import MarkdownField from '~/vue_shared/components/markdown/field.vue'; import MarkdownField from '~/vue_shared/components/markdown/field.vue';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { helpPagePath } from '~/lib/utils/help_page_utility'; import { helpPagePath } from '~/helpers/help_page_helper';
export default { export default {
name: 'DesignReplyForm', name: 'DesignReplyForm',
...@@ -61,6 +61,9 @@ export default { ...@@ -61,6 +61,9 @@ export default {
? s__('DesignManagement|Comment') ? s__('DesignManagement|Comment')
: s__('DesignManagement|Save comment'); : s__('DesignManagement|Save comment');
}, },
markdownDocsPath() {
return helpPagePath('user/markdown');
},
}, },
mounted() { mounted() {
this.focusInput(); this.focusInput();
...@@ -80,9 +83,6 @@ export default { ...@@ -80,9 +83,6 @@ export default {
this.$refs.textarea.focus(); this.$refs.textarea.focus();
}, },
}, },
helpLinks: {
markdownDocsPath: helpPagePath('user/markdown'),
},
}; };
</script> </script>
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
:can-attach-file="false" :can-attach-file="false"
:enable-autocomplete="true" :enable-autocomplete="true"
:textarea-value="value" :textarea-value="value"
:markdown-docs-path="$options.helpLinks.markdownDocsPath" :markdown-docs-path="markdownDocsPath"
class="bordered-box" class="bordered-box"
> >
<template #textarea> <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