mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05: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
1 changed files with 0 additions and 13 deletions
|
@ -65,18 +65,6 @@ export default Component.extend({
|
||||||
this._focusInput();
|
this._focusInput();
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
|
||||||
this._super(...arguments);
|
|
||||||
|
|
||||||
run.cancel(this._resizeDebounce);
|
|
||||||
|
|
||||||
if (this._iframeMutationObserver) {
|
|
||||||
this._iframeMutationObserver.disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
window.removeEventListener('resize', this._windowResizeHandler);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
onDeselect() {
|
onDeselect() {
|
||||||
if (this.payload.url && !this.payload.metadata && !this.hasError) {
|
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, 'linkOnError', undefined);
|
||||||
set(this.payload, 'metadata', response.metadata);
|
set(this.payload, 'metadata', response.metadata);
|
||||||
set(this.payload, 'type', response.type);
|
|
||||||
this.saveCard(this.payload, false);
|
this.saveCard(this.payload, false);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (this.payload.linkOnError) {
|
if (this.payload.linkOnError) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue