Skip to content

Commit

Permalink
chore: replacing amf setter with the callback function
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodek committed Aug 25, 2019
1 parent 787f5f2 commit ce94640
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions api-request-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,6 @@ class ApiRequestEditor extends AmfHelperMixin(EventsTargetMixin(LitElement)) {
this._selectedChanged();
}

get amf() {
return this._amf;
}

set amf(value) {
const old = this._amf;
/* istanbul ignore if */
if (old === value) {
return;
}
this._amf = value;
this._selectedChanged();
}

get url() {
return this._url;
}
Expand Down Expand Up @@ -443,6 +429,12 @@ class ApiRequestEditor extends AmfHelperMixin(EventsTargetMixin(LitElement)) {
window.removeEventListener('api-response', this._responseHandler);
node.removeEventListener('oauth2-redirect-uri-changed', this._authRedirectChangedHandler);
}
/**
* Overrides `AmfHelperMixin.__amfChanged`
*/
__amfChanged() {
this._selectedChanged();
}
/**
* Dispatches bubbling and composed custom event.
* By default the event is cancelable until `cancelable` property is set to false.
Expand Down

0 comments on commit ce94640

Please sign in to comment.