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.addDiscoveryQueryParam('solved', {replace: true, refreshModel: true});
|
||||
if (api.addDiscoveryQueryParam) {
|
||||
api.addDiscoveryQueryParam('solved', {replace: true, refreshModel: true});
|
||||
}
|
||||
|
||||
api.addPostMenuButton('solved', attrs => {
|
||||
const canAccept = attrs.can_accept_answer;
|
||||
|
|
Loading…
Reference in New Issue