mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 01:56:58 +08:00
FIX: Allow poll feature to be disabled in discourse-markdown (#15025)
This commit is contained in:

committed by
GitHub

parent
97b27a7426
commit
a9d5921901
@ -262,7 +262,9 @@ const rule = {
|
|||||||
|
|
||||||
function newApiInit(helper) {
|
function newApiInit(helper) {
|
||||||
helper.registerOptions((opts, siteSettings) => {
|
helper.registerOptions((opts, siteSettings) => {
|
||||||
opts.features.poll = !!siteSettings.poll_enabled;
|
if (!siteSettings.poll_enabled) {
|
||||||
|
opts.features.poll = false;
|
||||||
|
}
|
||||||
opts.pollMaximumOptions = siteSettings.poll_maximum_options;
|
opts.pollMaximumOptions = siteSettings.poll_maximum_options;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user