FIX: Allow poll feature to be disabled in discourse-markdown (#15025)

This commit is contained in:
Mark VanLandingham
2021-11-19 15:10:47 -06:00
committed by GitHub
parent 97b27a7426
commit a9d5921901

View File

@ -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;
});