From a9d592190193968023d6201f6d72b33f6558ab7a Mon Sep 17 00:00:00 2001 From: Mark VanLandingham Date: Fri, 19 Nov 2021 15:10:47 -0600 Subject: [PATCH] FIX: Allow poll feature to be disabled in discourse-markdown (#15025) --- .../poll/assets/javascripts/lib/discourse-markdown/poll.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js b/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js index 543a8e67d9c..6238e32d574 100644 --- a/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js +++ b/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js @@ -262,7 +262,9 @@ const rule = { function newApiInit(helper) { helper.registerOptions((opts, siteSettings) => { - opts.features.poll = !!siteSettings.poll_enabled; + if (!siteSettings.poll_enabled) { + opts.features.poll = false; + } opts.pollMaximumOptions = siteSettings.poll_maximum_options; });