mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 04:14:38 +08:00
FIX: error if decorateCooked is called without a helper for a post with a poll
This commit is contained in:
@ -59,6 +59,10 @@ function initializePolls(api) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!helper) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const post = helper.getModel();
|
const post = helper.getModel();
|
||||||
api.preventCloak(post.id);
|
api.preventCloak(post.id);
|
||||||
const votes = post.get("polls_votes") || {};
|
const votes = post.get("polls_votes") || {};
|
||||||
|
Reference in New Issue
Block a user