Cleaned up unused code in bookmark card

no issue

- the `willDestroyElement` hook is referencing event handlers that aren't used in the bookmark card
- stopped setting `type` in the card payload as it's not used anywhere (possible hangover from when bookmarks were a type of embed card)
This commit is contained in:
Kevin Ansfield 2020-01-21 17:45:19 +00:00
parent 397e18c7c0
commit 4b40346ff4

View File

@ -65,18 +65,6 @@ export default Component.extend({
this._focusInput();
},
willDestroyElement() {
this._super(...arguments);
run.cancel(this._resizeDebounce);
if (this._iframeMutationObserver) {
this._iframeMutationObserver.disconnect();
}
window.removeEventListener('resize', this._windowResizeHandler);
},
actions: {
onDeselect() {
if (this.payload.url && !this.payload.metadata && !this.hasError) {
@ -162,7 +150,6 @@ export default Component.extend({
set(this.payload, 'linkOnError', undefined);
set(this.payload, 'metadata', response.metadata);
set(this.payload, 'type', response.type);
this.saveCard(this.payload, false);
} catch (err) {
if (this.payload.linkOnError) {