A platform for community discussion. Free, open, simple.
FIX: Allow poll feature to be disabled in discourse-markdown (#15025)
Mark VanLandinghama9d592190193
diff --git a/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js b/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.jsindex 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;});