mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
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:
parent
397e18c7c0
commit
4b40346ff4
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user