mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
Koenig - Fixed /-menu Enter
card creation
refs https://github.com/TryGhost/Ghost/issues/9724
- e16a300217
introduced a bug because it expected an event param that is only available when clicking
- add guard to check for `event` presence before attempting to stop propagation
This commit is contained in:
parent
055a39aca1
commit
5192cff9fd
|
@ -96,8 +96,10 @@ export default Component.extend({
|
|||
// make sure the click doesn't propagate and get picked up by the
|
||||
// newly inserted card which can then remove itself because it
|
||||
// looks like a click outside of an empty card
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
// params are order-dependent and listed in CARD_MENU for each card
|
||||
if (!isEmpty(item.params) && !isEmpty(params)) {
|
||||
|
|
Loading…
Reference in a new issue