Tried fixing closing error.
This commit is contained in:
+6
-11
@@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user