Tried fixing closing error.

This commit is contained in:
Severin Opel 2019-10-15 09:12:12 +02:00
parent 122493df19
commit 66da13aed6
1 changed files with 6 additions and 11 deletions

View File

@ -67,18 +67,13 @@ export default class Card {
static close(event) {
let context = this.getContext(event.target)
if (context.onClose != null) {
context.onClose()
} else {
this.remove(context)
if (context) {
if (context.onClose != null) {
context.onClose()
} else {
this.remove(context)
}
}
// console.error("Remove")
// let context = this.getContext(event.target)
// if (context) {
// this.remove(context)
// } else console.error('Could not find context!', event.target)
}
/**