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

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFerdinand Thiessen <rpm@fthiessen.de>2022-06-29 21:06:43 +0300
committerJonas <jonas@freesources.org>2022-07-04 10:43:05 +0300
commitd26ed3222cfe338d111a3d4b673c2043930c05d5 (patch)
tree38a5e3603389b5084c8749ef8df67d3b5afef408 /src/components/PlainTextReader.vue
parent014f73fced8c39475f5cc1be9fdcef75e23a5172 (diff)
BaseReader: Use a factory pattern for creating the extension list
Provide functions are neither called on the providing object nor on the injecting object, so using `this` within provided functions will refer to the global `this` for which `$emit` is not defined. This uses a factory pattern so that `this` is bound to the injecting object. Also forwarding the `click-link` event is needed. Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'src/components/PlainTextReader.vue')
-rw-r--r--src/components/PlainTextReader.vue2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/PlainTextReader.vue b/src/components/PlainTextReader.vue
index 6d2ccf7a7..5d01acad7 100644
--- a/src/components/PlainTextReader.vue
+++ b/src/components/PlainTextReader.vue
@@ -37,7 +37,7 @@ export default {
renderHtml(content) {
return '<pre>' + escapeHtml(content) + '</pre>'
},
- extensions: [PlainText],
+ extensions: () => [PlainText],
},
props: {