mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-07-05 05:12:11 +00:00
Check for presence of API before using
This commit is contained in:
parent
d041d6a821
commit
8245c7b5e7
@ -113,7 +113,9 @@ function initializeWithApi(api) {
|
|||||||
|
|
||||||
api.includePostAttributes('can_accept_answer', 'can_unaccept_answer', 'accepted_answer');
|
api.includePostAttributes('can_accept_answer', 'can_unaccept_answer', 'accepted_answer');
|
||||||
|
|
||||||
|
if (api.addDiscoveryQueryParam) {
|
||||||
api.addDiscoveryQueryParam('solved', {replace: true, refreshModel: true});
|
api.addDiscoveryQueryParam('solved', {replace: true, refreshModel: true});
|
||||||
|
}
|
||||||
|
|
||||||
api.addPostMenuButton('solved', attrs => {
|
api.addPostMenuButton('solved', attrs => {
|
||||||
const canAccept = attrs.can_accept_answer;
|
const canAccept = attrs.can_accept_answer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user